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 18:01
1026 查看
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 setup.py的时候,又出现了问题,从显示的信息是网络连接不上,默认是从这个网址进行下载https://pypi.python.org/simple/,
然后搜到了这篇博客,也就是pip install与通过python setup.py文件进行安装是解析的不同的文件,这个则需要建立
~/.pydistutils.cfg
将该文件编辑保存之后,再次运行 python setup.py很快就可以装上了。
今天在按照上面的命令安装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 setup.py的时候,又出现了问题,从显示的信息是网络连接不上,默认是从这个网址进行下载https://pypi.python.org/simple/,
然后搜到了这篇博客,也就是pip install与通过python setup.py文件进行安装是解析的不同的文件,这个则需要建立
~/.pydistutils.cfg来配置distutils的源
~/.pydistutils.cfg
1 2 | [easy_install] index_url = http://pypi.douban.com/simple[/code] |
相关文章推荐
- pip安装jupyter时报错Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-Fd4ir0/
- 出现Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build*解决办法
- python2.7 安装channels出现Command"python setup.py egg_info" failed with error code 1 in /tmp/pip-build-y
- pip安装软件时出现Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build*的解决方案
- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-b2PICB/unroll/
- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-GVQWxt/ipython/
- ubuntu 安装mysql 错误Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-lmPxC
- 【已解决】Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-GFFuD_/ipython/
- pip安装软件时出现Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build*的解决方案
- pip安装icu失败:Command "python setup.py egg_info" failed with error code 1 in
- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-wttdx0g1/secp256k1/
- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-o2julgbe/xgboost/
- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-vqeCP7/Django/
- pip安装软件时出现Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build*的解决方案
- pip安装软件时出现Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build*的解决方案
- Command "python setup.py egg_info" failed with error code 1 in ...
- pip安装出现Command "python setup.py egg_info" failed with error code 1 的解决方案
- command "python setup.py egg_info" failed with error code 1 in ...
- 解决安装ipython时Command "python setup.py egg_info" failed with error code 1 in /tmp