pip / anaconda modified image source module mounting accelerating speed python
The reason is to modify the mirror source pip and conda default source image abroad, so each installation module pip install ××× or conda install ××× time is very slow. Therefore, switching to a domestic mirror source module mounting significantly accelerated speed.
pip and conda modify mirroring differences in the way, there are a lot of online tutorials, I put together these tutorials are summarized.
pip modified mirror source
Domestic sources:
a new version of ubuntu require the use of https source, to pay attention.
Tsinghua: https://pypi.tuna.tsinghua.edu.cn/simple
Ali cloud: http://mirrors.aliyun.com/pypi/simple/
China University of Science and Technology https://pypi.mirrors.ustc.edu.cn / simple /
Huazhong University of Science and Technology: http://pypi.hustunique.com/
Shandong University of Technology: http://pypi.sdutlinux.org/
watercress: http://pypi.douban.com/simple/
mirror source Tsinghua is the most common, after I tried several mirror source, find a good quality USTC more quickly.
1. For Linux systems:
mkdir ~/.pip
cd ~/.pip
vi pip.conf
123
Press i to enter edit mode:
[global]
index-url = https://pypi.mirrors.ustc.edu.cn/simple/
12
Press ESC, and then enter wq save.
2. For the windows system:
cd C:\Users\(你的用户名)
mkdir pip
cd pip
cd.>pip.ini
1234
Then open the C: \ Users (username) \ pip \ pip.ini, pasting and linux systems the same content in it:
[global]
index-url = https://pypi.mirrors.ustc.edu.cn/simple/
12
When installed with a pip, we found that mirror source link changes, you have won ~
#Conda modify the image source
Linux and Windows as a mirror source for conda modified method:
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes
12
Check whether to add on a channel you can use:
vim ~/.condarc
1
See this on the right:
Then, try to install a module:
Conda install a module just to try to see the link into Tsinghua, you are right -