环境:MACos pip3(Windows一样)
报了很长的错,找到一句代码:
pip --default-timeout=100 install -U +库名
例如
pip --default-timeout=100 install -U networkx
报的错误:
Traceback (most recent call last):
File “/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_vendor/urllib3/response.py”, line 360, in _error_catcher
yield
File “/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_vendor/urllib3/response.py”, line 442, in read
data = self._fp.read(amt)
File “/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_vendor/cachecontrol/filewrapper.py”, line 62, in read
data = self.__fp.read(amt)
File “/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py”, line 457, in read
n = sel

在MACos环境下使用pip3安装networkx时遇到ReadTimeoutError,错误出现在pip的_response.py文件中。问题可能源于网络连接超时。建议检查网络状况,重试安装或更换镜源。
最低0.47元/天 解锁文章
486

被折叠的 条评论
为什么被折叠?



