Preface
Overview of this article: Linux and Windows operating systems can permanently set the pip download source to the domestic download source with one click, avoiding the trouble of finding the mirror address everywhere when using temporary sources.
Author's introduction: The author is an artificial intelligence alchemist. Currently, the main research direction in the laboratory is generative models. He also has some knowledge of other directions. He hopes to communicate with friends who are also interested in artificial intelligence on the CSDN platform. Share and make progress together. Thank you everyone~~~
如果你觉得这篇文章对您有帮助,麻烦点赞、收藏或者评论一下,这是对作者工作的肯定和鼓励。
Stop talking nonsense and get straight to work. Just copy and run the following code to achieve permanent pip source change.
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
When a prompt like the picture appears, the modification is successful.
The above is pip permanently set to Tsinghua source. If you need to set it to other mirror sources, you can refer to the list below.
Mirror source | Mirror address |
---|---|
Ali Cloud | https://mirrors.aliyun.com/pypi/simple/ |
University of Science and Technology of China (recommended) | https://pypi.mirrors.ustc.edu.cn/simple/ |
Tsinghua University (recommended) | https://pypi.tuna.tsinghua.edu.cn/simple |
Huazhong University of Science and Technology | http://pypi.hustunique.com/ |
Douban | http://pypi.douban.com/simple |
Shandong University of Technology | http://pypi.sdutlinux.org/ |
Sohu mirror | http://mirrors.sohu.com/Python/ |
V2EX | pypi.v2ex.com/simple |
Epilogue
如果您觉得这篇文章对您有帮忙,请点赞、收藏。您的点赞是对作者工作的肯定和鼓励,这对作者来说真的非常重要。如果您对文章内容有任何疑惑和建议,欢迎在评论区里面进行评论,我将第一时间进行回复。