• 安装python第三方库失败 Read timed out
    我在pycharm里添加安装第三方库,pandas, numpy 等都装上,了就是安装sklearn的时候他老是报错,网上找了一下原因,国外的网站下载速度太慢,导致超时失败

  • 解决方案
    1.更换源
    2.修改默认时间
    我采用的是第二种
    Linux(Ubuntu 16.04)平台:pip install xxx
    报错:
    raise ReadTimeoutError(self._pool, None, ‘Read timed out.’)
    pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host=‘files.pythonhosted.org’, port=443): Read timed out.
    解决:
    pip --default-timeout=100 install -U xxx

Windows平台:pip install xxx(命令行或者pycharm里的终端报错一样)
报错:
Traceback (most recent call last):
File “C:\Users\lenove\PycharmProjects\untitled5\venv\lib\site-packages\pip-19.0.3-py3.7.egg\pip_vendor\urllib3\response.py”, line 360, in _error_catcher
yield

socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

解决:
pip --default-timeout=100 install -U xxx

Logo

更多推荐