我试图在setuptools的需求列表中包括pytorch:
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
后,我收到:
我还尝试使用source install链接,而不是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的正确方法是什么?(注:在我的情况下,使用Python不是一个选择)
谢谢。在
编辑:
正如答案中建议的那样,我也尝试了:
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).
第一个错误:如果使用指向控制盘文件的直接URL:
不能使用
@develop#egg=torch
。这部分是用来安装从风投,如git。在第二个URL
^{pr2}$也是错误的。应该是的
如果您想安装
develop
分支,@develop#egg=torch
就完全正确了。在相关问题 更多 >
编程相关推荐