更改pip源至国内镜像,显著提升下载速度
更改pip源至国内镜像,显著提升下载速度
学习了:https://blog.csdn.net/lambert310/article/details/52412059
永久修改,一劳永逸: linux下,修改 ~/.pip/pip.conf (没有就创建一个), 修改 index-url至tuna,内容如下: [global] index-url = https://pypi.tuna.tsinghua.edu.cn/simple windows下,直接在user目录中创建一个pip目录,如:C:\Users\xx\pip,新建文件pip.ini,内容如下 [global] index-url = https://pypi.tuna.tsinghua.edu.cn/simple
================================================
自己下载安装文件的地方:
https://pypi.org/
pip install requests-2.19.1 需要 chardet-3.0.4, idna-2.7, urllib3-1.23, certifi-2018.4.16;
https://packaging.python.org/tutorials/installing-packages/
pip install ./downloads/SomeProject-1.0.4.tar.gz
pip install chardet-3.0.4.tar.gz pip install idna-2.7.tar.gz pip install urllib3-1.23.tar.gz pip install certifi-2018.4.16.tar.gz pip install requests-2.19.1.tar.gz
=================================================
pip install requests
pip install elasticsearch
=================================================
还可以在C:\Users\xx\pip\pip.ini中写入
[global] format=columns # 还可以是 legacy
进行pip list的默认显示格式设定;