【发布时间】:2018-02-12 09:51:38
【问题描述】:
我正在尝试将 pytorch 包含在 setuptools 的要求列表中:
install_requires=[
'torch'
],
dependency_links=[
'http://download.pytorch.org/whl/cpu/torch-0.3.0.post4-cp27-cp27mu-linux_x86_64.whl' '@develop#egg=torch'
],
但是在运行python setup.py develop之后我收到了:
error: Can't download http://download.pytorch.org/whl/cpu/torch-0.3.0.post4-cp27-cp27mu-linux_x86_64.whl@develop#egg=torch: 403 Forbidden
我也尝试使用源安装链接而不是 pip 的链接:
install_requires=[
'torch'
],
dependency_links=[
'https://github.com/pytorch/pytorch#from-source' '@develop#egg=torch'
],
然后:
RuntimeError: PyTorch does not currently provide packages for PyPI (see status at https://github.com/pytorch/pytorch/issues/566).
通过 setuptools 安装 pytorch 的正确方法是什么? (注意:在我的情况下,使用 anaconda 不是一个选项)
谢谢。
编辑:
按照答案中的建议,我也尝试过:
dependency_links=[
'https://github.com/pytorch/pytorch'
],
dependency_links=[
'https://github.com/pytorch/pytorch#egg=torch'
],
dependency_links=[
'http://download.pytorch.org/whl/cpu/torch-0.3.0.post4-cp27-cp27mu-linux_x86_64.whl'
],
并收到:
RuntimeError: PyTorch does not currently provide packages for PyPI (see status at https://github.com/pytorch/pytorch/issues/566).
【问题讨论】:
标签: python pip setuptools pypi pytorch