Python:Pip(win10通过Anaconda安装)更换为国内源

有时候在Pycharm里面 pip install会超时,把pypi.org换成国内源。

1. 打开Windows terminal,在用户目录下操作

mkdir pip
cd pip
vi pip.ini

2. 在pip.ini中输入

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host = https://pypi.tuna.tsinghua.edu.cn  # trusted-host 此参数是为了避免麻烦,否则使用的时候可能会提示不受信任

3. 回到pycharm,速度70迈

发布了88 篇原创文章 · 获赞 5 · 访问量 7950

猜你喜欢

转载自blog.csdn.net/bornfree5511/article/details/104139468