原文链接:http://www.juzicode.com/archives/2238
错误提示:
在安装模块过程中提示:socket.timeout: The read operation timed out,并连续发生错误,pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host=’files.pythonhosted.org’, port=443): Read timed out.
File "d:\python\python38\lib\ssl.py", line 1099, in read
return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
raise ReadTimeoutError(self._pool, None, 'Read timed out.')
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.

可能原因:
1、国外的源不稳定。
解决方法:
1、改用国内的源安装,增加-i 选项,选择国内的源:
</

博客指出Python安装模块时出现socket.timeout和ReadTimeoutError错误,可能原因是国外的源不稳定。解决方法是改用国内的源安装,可增加 -i 选项并选择国内的源。
最低0.47元/天 解锁文章
5万+





