跳转至

pip

pip + 换源 ,能使用export http_proxy (:多试几次

pip install xxx -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host=mirrors.aliyun.com

pip

pip freeze >requirements.txt //导出
pip install -r requirements.txt //安装

换源

有时候开代理会出现Retry

vim ~/.pip/pip.conf 
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple

pip config set global.trusted-host pypi.mirrors.ustc.edu.cn  
pip install --trusted-host mirrors.bfsu.edu.cn icecream  

问题

requests.exceptions.ProxyError: HTTPSConnectionPool(host='upload.pypi.org', port=443): Max retries exceeded with url: /legacy/ (Caused by ProxyError('Cannot connect to proxy.', OSError(0, 'Error')))

不要挂代理

参考文献