News from this site

 Rental advertising space, please contact the webmaster if you need cooperation


+focus
focused

classification  

js(0)

jk(0)

tag  

js(0)

date  

no datas

Pycharm replaces Tsinghua, Ali, and Douban software sources to improve the download speed of dependent packages

posted on 2023-06-06 18:02     read(287)     comment(0)     like(6)     collect(5)


        Many students have encountered similar problems: when using Pycharm to download some dependent packages, the speed is lower than that of a certain degree of cloud disk , and it is still unstable. I basically never encounter such a situation, but for future convenience, I will record two ways to replace the software source today.

1. Manually add software source by GUI

First attach the commonly used source links:

  1. 清华源:https://pypi.tuna.tsinghua.edu.cn/simple
  2. 阿里源:https://mirrors.aliyun.com/pypi/simple/
  3. 豆瓣:https://pypi.douban.com/simple/

You can find other sources by yourself. These three are commonly used. I think they are enough. 

Open Pycharm, click File->Setting in the menu bar, the following interface will appear, click the "plus sign" in Figure 1

, and then click "Manage Repositories" in the image below:

2. Use the command line in the terminal to configure the software source

Open the Terminal in Pycharm, enter the following command, just replace the URL of any source you want to replace, you can see between the lines, this is the meaning of using Tsinghua source globally .

pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

 If you want to unset it, use:

pip config unset global.index-url

3. Temporary use of a certain software source

pip install xxx -i https://pypi.tuna.tsinghua.edu.cn/simple

Use the -i parameter to specify the downloaded software source, which will only be used during the current download.



Category of website: technical article > Blog

Author:mmm

link:http://www.pythonblackhole.com/blog/article/83317/a5fd0e3d15e9b2b14e0f/

source:python black hole net

Please indicate the source for any form of reprinting. If any infringement is discovered, it will be held legally responsible.

6 0
collect article
collected

Comment content: (supports up to 255 characters)