首页 > 编程语言 > 详细

python pip install 报错TypeError: unsupported operand type(s) for -=: 'Retry' and 'int' Command "python setup.py egg_info" failed with error code 1 in

时间:2017-10-25 19:13:51      阅读:5862      评论:0      收藏:0      [点我收藏+]

pip install http://download.pytorch.org/whl/cu80/torch-0.2.0.post3-cp27-cp27mu-manylinux1_x86_64.whl 
pip install torchvision

今天在按照上面的命令安装pytorch的时候,首先将whl文件下载到本地,然后直接pip install该文件,再安装的时候报错,TypeError: unsupported operand type(s) for -=: ‘Retry‘ and ‘int‘ ,

这个问题我是修改了pip的源解决的,参考这篇博客,将豆瓣源写到相应的文件中,然后第一步就成功了。

安装完第一步之后,再执行pip install torchvision的时候,又出现了如下的问题:这个是由于pip的版本太低引起的,后来搜到了这篇博客,运行如下的命令对pip进行升级:

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-NQWkHo/torch/
sudo python -m pip install --upgrade --force pip

然后就安装成功了

 

python pip install 报错TypeError: unsupported operand type(s) for -=: 'Retry' and 'int' Command "python setup.py egg_info" failed with error code 1 in

原文:http://www.cnblogs.com/rainsoul/p/7730390.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!