一、問題描述:
1、通過pip install jupyter 第三方軟件的時候報錯,如下圖:
二、解決辦法:
1、更換pip源,命令:pip install jupyter -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
2、使用命令后,仍然安裝不上報錯如下:
查看錯誤信息,提示需要升級pip版本才能正常安裝
3、升級pip版本:python -m pip install --upgrade pip
4、使用步驟3命令升級的時候提示還是超時,如下圖:
解決辦法:使用指定源進行pip的升級
python -m pip install --upgrade pip -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
升級成功,如下圖:
5、再次安裝jupyter :pip install jupyter -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com,報錯如下:
解決辦法:
進入python的安裝目錄:D:\Python3.7\Lib\site-packages\~ip* 刪除這個波浪線開頭的目錄就可以了
6、然后在執行:python -m pip install --upgrade pip -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com 即可安裝成功。
附:國內pip的安裝源地址
阿里雲 http://mirrors.aliyun.com/pypi/simple/
中國科技大學 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban) http://pypi.douban.com/simple/
清華大學 https://pypi.tuna.tsinghua.edu.cn/simple/
中國科學技術大學 http://pypi.mirrors.ustc.edu.cn/simple/