20200702
mint20
官方文檔:
https://pip.pypa.io/en/stable/user_guide/
建立配置文件
如果是linux
sudo xed /etc/pip.conf
發現必須設置成Site-wide . Per-user並不work
老版是這樣,現在不起作用了
切換方法參考https://blog.csdn.net/chenghuikai/article/details/55258957
實測,確實解決了pipenv這個問題,否則只能--skip-lock。
基本抄錄一下
~/.pip/pip.conf
如果是win
C:\Users\xx\pip\pip.ini
沒有pip文件夾的話,就自己創建
mkdir ~/.config/pip
mkdir ~/.pip
內容如下:
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host = https://pypi.tuna.tsinghua.edu.cn
備用方法
sudo pip3 install XXX -i https://pypi.tuna.tsinghua.edu.cn/simple
默認是
https://pypi.org/simple
其他http://mirrors.aliyun.com/pypi/simple/
https://pypi.tuna.tsinghua.edu.cn/simple
建好之后無須重啟注銷,直接pipenv起飛
如果win下還是慢,注意xx-net之類設置成“取消全局代理”。把pip文件開頭的source也改成這個
[[source]]url = "https://pypi.tuna.tsinghua.edu.cn/simple"
