我试图在setuptools的需求列表中包括py手电筒:
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).发布于 2018-02-12 13:54:21
第一个错误:如果使用轮式文件的直接URL:
http://download.pytorch.org/whl/cpu/torch-0.3.0.post4-cp27-cp27mu-linux_x86_64.whl您不能使用@develop#egg=torch。这部分是用来从VCS安装的,比如git。
第二个URL
https://github.com/pytorch/pytorch#from-source也是错的。它应该是
https://github.com/pytorch/pytorch如果您想安装@develop#egg=torch分支,这里的develop是完全正确的。
https://stackoverflow.com/questions/48743554
复制相似问题