Python在安裝庫的時候發現下載速度很慢,可以更換為國內源
國內比較好的源:
清華源:https://pypi.tuna.tsinghua.edu.cn/simple
豆瓣源:http://pypi.douban.com/simple/
阿里源:http://mirrors.aliyun.com/pypi/simple/
解決辦法一:
在pip install 庫名 -i 想要使用源
如
pip install lxml -i https://pypi.tuna.tsinghua.edu.cn/simple
1
解決辦法二:
更換辦法:在c盤C:\Users%path%\AppData\Roaming(%path%為你的用戶名字)下自己創建一個pip的文件夾,在此文件下創建一個pip.ini的文件
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host=pypi.douban.com
---------------------