網上收集來的pip源地址:
阿里雲 http://mirrors.aliyun.com/pypi/simple/
中國科技大學 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban) http://pypi.douban.com/simple/
清華大學 https://pypi.tuna.tsinghua.edu.cn/simple/
中國科學技術大學 http://pypi.mirrors.ustc.edu.cn/simple/
setuptools 工具
function:安裝pip工具的前置依賴
https://pypi.org/project/setuptools/#files
python setup.py install
pip 工具:(需要先安裝setuptools工具)
function:支持大部分python模塊的安裝
https://pypi.org/project/pip/#files
python setup.py install
wheel工具:(需要先安裝pip工具)
function: 支持.whl后綴文件安裝
pip install wheel
Tips:一個推薦的whl模塊下載網站
https://www.lfd.uci.edu/~gohlke/pythonlibs/
臨時使用三方源的方式:(命令版)
pip install <模塊名> -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
永久使用三方源的方式:(修改文件版)
Linux版本修改pip源使用國內源:
~/.pip/pip.conf(如果沒有就自行創建)
Windows版本修改pip源使用國內源:
%HOMEPATH%\pip\pip.ini
修改配置文件內容:
[global]
index-url = http://pypi.douban.com/simple
[install]
trusted-host=pypi.douban.com # 如果不添加這兩行,將會出現如下錯誤提示:
參考資料:
https://blog.csdn.net/chenghuikai/article/details/55258957
https://www.cnblogs.com/sunnydou/p/5801760.html