修改pip3默认源
cd ~/
mkdir .pip
cd .pip
touch pip.conf
gedit pip.conf
在pip.conf中添加:
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
参考
让pip指向pip3
sudo gedit /usr/bin/pip
#!/usr/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from pip import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())
第一行修改为
#!/usr/bin/python3
参考