臨時換源:
pip3 install 包名 -i 源的url
國內源列表
清華大學 https://pypi.tuna.tsinghua.edu.cn/simple/
阿里雲 http://mirrors.aliyun.com/pypi/simple/
中國科技大學 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban) http://pypi.douban.com/simple/
中國科學技術大學 http://pypi.mirrors.ustc.edu.cn/simple
如果提示連接超時可以設置超時時間
pip3 --default-timeout=100 install 包名 -i 源的url
//補充:
如果存在pip3的版本過低,需要更新的情況
卸載:sudo apt-get remove python3-pip
可以使用wget https://bootstrap.pypa.io/get-pip.py 下載get-pip.py , 然后用sudo python3 get-pip.py 來重新安裝pip3