0%

Anacoda 修改 pip 源

来源: 更改pip源/anaconda源:windows与linux

Windows

c:\user\xxxName\pip\pip.ini 中加入

1
2
3
4
5
6
7
[global]
# 清华源
index-url=https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host=pypi.tuna.tsinghua.edu.cn
disable-pip-version-check = true
timeout = 6000

需要 创建pip文件夹 与 pip.ini 文件

Linux

1
2
3
4
5
6
7
8
9
10
11
12
cd $HOME  
mkdir .pip
cd .pip
sudo vim pip.conf

在里面添加
[global]
index-url=https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host=pypi.tuna.tsinghua.edu.cn
disable-pip-version-check = true
timeout = 6000