清华大学pip镜像
https://mirrors.tuna.tsinghua.edu.cn/help/pypi/
# win设置为默认
pip install pip -U
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
# Linux
vim ~/.pip/pip.conf
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host=pypi.tuna.tsinghua.edu.cn
安装包
pip3 install package -i https://pypi.tuna.tsinghua.edu.cn/simple
将当前环境pip3包名和版本写入文件
pip3 freeze > packages.version
下载保存pip3包及依赖包
pip3 download -r packages.version -d pip3_packages/ -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn
pip3 download -r packages.version -d pip3_packages/ -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
pip3安装离线包
pip3 install --no-index --find-links=file:./pip3_packages/ -r packages.version
卸载