解決pip下載過慢、python更換pip鏡像源

pip下載經(jīng)常的443、reading time out 卡死,折騰我們的生命非常的不友好。
1.臨時(shí)換源:
復(fù)制代碼
#清華源
pip3 install markdown -i https://pypi.tuna.tsinghua.edu.cn/simple
阿里源
pip3 install markdown -i https://mirrors.aliyun.com/pypi/simple/
騰訊源
pip3 install markdown -i http://mirrors.cloud.tencent.com/pypi/simple
豆瓣源
pip3 install markdown -i http://pypi.douban.com/simple/
2.永久換源:
清華源
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
阿里源
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
騰訊源
pip config set global.index-url http://mirrors.cloud.tencent.com/pypi/simple
豆瓣源
pip config set global.index-url http://pypi.douban.com/simple/
換回默認(rèn)源
pip config unset global.index-url
標(biāo)簽: