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.
First attach the commonly used source links:
- 清华源:https://pypi.tuna.tsinghua.edu.cn/simple
- 阿里源:https://mirrors.aliyun.com/pypi/simple/
- 豆瓣: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:
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.
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.
name:
Comment content: (supports up to 255 characters)
Copyright © 2018-2021 python black hole network All Rights Reserved All rights reserved, and all rights reserved.京ICP备18063182号-7
For complaints and reports, and advertising cooperation, please contact vgs_info@163.com or QQ3083709327
Disclaimer: All articles on the website are uploaded by users and are only for readers' learning and communication use, and commercial use is prohibited. If the article involves pornography, reactionary, infringement and other illegal information, please report it to us and we will delete it immediately after verification!