尝试使用pip时出错

2024-05-03 18:35:54 发布

您现在位置:Python中文网/ 问答频道 /正文

我也有同样的错误: Python PIP Install throws TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'

不管我用pip安装什么,我都会得到相同的错误。 系统信息:Linux版本4.4.0-38-generic(地址:lgw01-58)(gcc版本5.4.0 20160609(Ubuntu 5.4.0-6ubuntu1~16.04.2))#57 Ubuntu SMP 2016年9月6日星期二15:42:33 UTC

如果我尝试使用该问题上发布的解决方案,则会出现无法访问的错误:

$ sudo python get-pip.py
The directory '/home/theoa/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/theoa/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f344927ee50>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/pip/
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f344ac77a10>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/pip/
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f344ac77b90>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/pip/
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f344ac77d10>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/pip/
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f344ac77e90>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/pip/

我确实试着在原始帖子的回复中发表这篇文章,但显然这是错误的做法,它被删除了。在

这是原始错误,谢谢。在

^{pr2}$

Tags: pipandthenonereadbyisconnect