Solve problems PyCharm download Python third party libraries slow

Solve problems PyCharm download Python third party libraries slow


Recently time out frequently encountered types of problems when you download Python package in PyCharm environment, the solution will now be described as follows:

PyCharm open, click File -> Settings, as shown below:
Here Insert Picture Description
Select option left Project ** Project Interproter, click on the "+" option the top right, i.e. installation Install option, the following steps shown below:
Here Insert Picture Description
Select the lower left angle Manage Repositories option
Here Insert Picture Description
at this time, can be found in the Python comes pip is the official source for domestic use pip installation time is very slow, so here is recommended to replace the Chinese domestic source address. Specific methods click the default official source, select Uninstall, and then add the country of source address, specific steps as shown below:
Here Insert Picture Description
Currently pip mirror source are:
Qinghua: https://pypi.tuna.tsinghua.edu.cn/simple
watercress: http://pypi.douban.com/simple/
Ali: http://mirrors.aliyun.com/pypi/simple/

Then add a domestic source address in the following pop-up window.
Here Insert Picture Description

Here Insert Picture Description
Here Insert Picture Description
At this time, the source address has been updated, click OK.
Note: After you have replaced Be sure to remember to click the Refresh button to refresh the interface after as shown below:
Here Insert Picture Description
Select an installation package to download, then find latency was significantly shortened.
Here Insert Picture Description
At this point, if the above method is still not solve the problem, it can be found in the Windows pip Python files in the root folder, create a new file pip.ini within the folder, add the following to the file.

[global]
timeout = 6000
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
trusted-host = https://pypi.tuna.tsinghua.edu.cn

Published 21 original articles · won praise 6 · views 8017

Guess you like

Origin blog.csdn.net/weixin_42128329/article/details/100005642