Tag Archives: ——ReadTimeoutError

Error in installing Python package — readtimeouterror

1、 Problem: error readtimeouterror is reported when installing Python package — read time out

2. Solutions
there are three methods: one is to switch the download source; Second, download the installation package of the corresponding platform and install it; Third, download the source code, compile and install
  The first method is to switch the download source recommendation

      https://pypi.tuna.tsinghua.edu.cn/simple

      http://pypi.douban.com/simple/

      Example: PIP install   Package name   — user -i   https://pypi.tuna.tsinghua.edu.cn/simple

      Permanent switch: under Linux, modify or create ~ /. PIP/pip.conf. The modification contents are as follows:

   [ global]

    index-url = https://pypi.tuna.tsinghua.edu.cn/simple

  Under windows, directly create a PIP directory in the user directory, such as C: \ users \ XX \ pip, and create a new file pip.ini, as follows:

  [ global]

    index-url = https://pypi.tuna.tsinghua.edu.cn/simple

 

  The second method is to download the installation package of the corresponding platform

      Baidu finds the PY package, selects the package of the corresponding platform, downloads and installs it, as shown in the figure below

 

 

 

 

The third method is to download the source code, compile and install

      If the installation package of the corresponding platform cannot be found, you can only download and compile the source code and then install it. For example, the last zip file in the figure below is the source code