python pip install 报错TypeError: unsupported operand type(s) for -=: 'Retry' and 'int' Command "python setup.py egg_info" failed with error code 1 in
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
来配置distutils的源
~/.pydistutils.cfg
|
|
将该文件编辑保存之后,再次运行 python setup.py很快就可以装上了。
后来豆瓣源不起作用了,又换成了清华源:
gedit ~/.pip/pip.conf
- [global]
- index-url = https://pypi.tuna.tsinghua.edu.cn/simple
- [install]
- trusted-host=pypi.douban.com
python pip install 报错TypeError: unsupported operand type(s) for -=: 'Retry' and 'int' Command "python setup.py egg_info" failed with error code 1 in的更多相关文章
- 解决pip安装时出现报错TypeError unsupported operand type(s) for -= 'Retry' and 'int'
1.参考 https://stackoverflow.com/questions/42610545/typeerror-unsupported-operand-types-for-retry-and- ...
- pip安装mysql-python报错:Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-enRreC/mysql-python/
公司业务开发,用python开发网站;需要使用模块MySQLdb. 我直接pip install MySQLdb,当然不成功了,模块名字因该是mysql-python pip install mysq ...
- python下pip 安装 pyautogui报错Command "python setup.py egg_info" failed with error code 1 in C:\Users\Administrator\AppData\Local\Temp\pip-install-svhtepho\pygetwindow\
python装的3.6 64位,使用命令pip install pyautogui 或者pip install -U pyautogui 都失败了 报错如下: Command "python ...
- python pip安装报错python setup.py egg_info failed with error code 1
安装locust遇到点问题折腾了好一会儿,记录一下. 使用命令pip install locustio提示python setup.py egg_info failed with error cod ...
- pip安装报错Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-e_k8hq6a/pynacl/
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-e_k8hq6a/pyn ...
- python2 使用pip安装psycopg2出现错误:Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-mvzdNj/psycopg2/
公司业务需求,开发语言python2,需要使用数据库:postgresql,需要安装模块psycopg2这个模块, 使用pip install psycopg2 报错: Command "p ...
- Command "python setup.py egg_info" failed with error code 10
1:今天系统重装以后,下载了新的版本的python3.6.1.然后想通过pycurl模块测试URL,突然发现windows10下我无法通过pip安装pycurl模块了,报错内容如下 Collectin ...
- Command "python setup.py egg_info" failed with error code 1一种问题的解决方法
问题描述:无论是你在pycharm中直接使用import and install命令,还是pip的时候出现了Command "python setup.py egg_info" f ...
- Command "python setup.py egg_info" failed with error code 1 in C:\Users\w5659\AppData\Local\Temp\pip-install-t7uomu4r\xa dmin\
Error msg: C:\Users\w5659>pip install xadmin Collecting xadmin Using cached https://files.pythonh ...
随机推荐
- 字节顺序:高位优先(big-endian)和低位优先(little-endian)
网络字节序: MSB 高字节前存法 Most Significant Bit (Big Edian) 主机字节序: LSB 低字节前存法 Lest Significant Bit (Little ...
- Swift 中函数使用指南
关于Swift中的各种函数的使用的总结 前言 时间久了,好多东西我们就会慢慢忘记,在这里总结一下Swift中函数的使用原则,把大部分的函数使用技巧用代码示例来做了演示,但是如果想提高,还是要多多思考才 ...
- 面试Spring之bean的生命周期
找工作的时候有些人会被问道Spring中Bean的生命周期,其实也就是考察一下对Spring是否熟悉,工作中很少用到其中的内容,那我们简单看一下. 在说明前可以思考一下Servlet的生命周期:实例化 ...
- Java8学习笔记(三)--方法引入
基本概念 格式 实例变量名 | 类名 :: 静态方法 | 实例方法 作用 简化Lambda表达式 示例 a -> System.out.println(a); <=> System. ...
- [Localization] SSD - Single Shot MultiBoxDetector
Prerequisite: VGG Ref: [Object Tracking] Localization and Detection SSD Paper: http://lib.csdn.net/a ...
- 嵌入式Linux应用开发__求职要求
A.熟悉嵌入式软件开发,有较好的C语言开发能力,熟悉Linux线程,信号量,同步,消息队列,网络编程,音频等:B.能够熟练使用GDB调试工具:C.熟悉linux脚本,对于Android编译环境有一定理 ...
- java基本数据结构和算法
private class Node { 6 private Object data; //数据 7 private Node next = null; //指向下个结点的引用 8 9 public ...
- E - Radar Installation
Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. ...
- ThinkPHP框架 表单传值自动验证!!
如果有多个字段都包含错误,默认只显示一个错误.如果想显示全部错误,可以设置属 性: //批量验证 d protected $patchValidate = true; 如果是直接 POST 过来的,直 ...
- iis和tomcat(整合)
---恢复内容开始--- (一) 为什么要把IIS.Tomcat整合到一起?假如你遇到这种情况,你开发了一个javaweb项目要部署到服务器上,但是这个服务器上已经部署了asp.asp.net ...