首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >我无法在Google Colab中安装torch-sparse

我无法在Google Colab中安装torch-sparse
EN

Stack Overflow用户
提问于 2020-02-04 22:36:47
回答 1查看 1.7K关注 0票数 1

我正在尝试在谷歌Colab using ! pip install torch-sparse中安装torch-sparse,但我得到了以下错误:

代码语言:javascript
运行
复制
Collecting torch-sparse

      Using cached https://files.pythonhosted.org/packages/0e/bf/6242893c898621e7e4756e1ad298e903df6dfae208aec1c32adf8cfd1f7f/torch_sparse-0.4.4.tar.gz
    Requirement already satisfied: scipy in /usr/local/lib/python3.6/dist-packages (from torch-sparse) (1.4.1)
    Requirement already satisfied: numpy>=1.13.3 in /usr/local/lib/python3.6/dist-packages (from scipy->torch-sparse) (1.17.5)
    Building wheels for collected packages: torch-sparse
      Building wheel for torch-sparse (setup.py) ... error
      ERROR: Failed building wheel for torch-sparse
      Running setup.py clean for torch-sparse
    Failed to build torch-sparse
    Installing collected packages: torch-sparse
        Running setup.py install for torch-sparse ... error
    ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-h3_oysnr/torch-sparse/setup.py'"'"'; __file__='"'"'/tmp/pip-install-h3_oysnr/torch-sparse/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-0xvimdk5/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.

我怎么才能修复它?

EN

回答 1

Stack Overflow用户

发布于 2020-02-10 19:25:42

您需要进入运行时图形处理器,更改运行时类型,并选择->作为硬件加速器。在此之后,它应该安装得很好。

代码语言:javascript
运行
复制
Collecting torch-sparse
  Downloading https://files.pythonhosted.org/packages/0e/bf/6242893c898621e7e4756e1ad298e903df6dfae208aec1c32adf8cfd1f7f/torch_sparse-0.4.4.tar.gz
Requirement already satisfied: scipy in /usr/local/lib/python3.6/dist-packages (from torch-sparse) (1.4.1)
Requirement already satisfied: numpy>=1.13.3 in /usr/local/lib/python3.6/dist-packages (from scipy->torch-sparse) (1.17.5)
Building wheels for collected packages: torch-sparse
  Building wheel for torch-sparse (setup.py) ... done
  Created wheel for torch-sparse: filename=torch_sparse-0.4.4-cp36-cp36m-linux_x86_64.whl size=4956229 sha256=0463ad1735eb37f9f555b7c83b32bd43cfee20e312061e8efca43f2c29158fbb
  Stored in directory: /root/.cache/pip/wheels/8a/1a/6f/88952b83ebba6b2742909fcd6e320e3a99fc7d2a2428391f8c
Successfully built torch-sparse
Installing collected packages: torch-sparse
Successfully installed torch-sparse-0.4.4
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/60059680

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档