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:
Select option left Project ** Project Interproter, click on the "+" option the top right, i.e. installation Install option, the following steps shown below:
Select the lower left angle Manage Repositories option
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:
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.
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:
Select an installation package to download, then find latency was significantly shortened.
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