一 報錯類型
二 原因
可能我們使用pip install --upgrade pip或者conda安裝一下包時因為網(wǎng)絡(luò)原因?qū)е轮皇切遁d舊版本而未安裝。
三 解決策略
3.1 Anaconda
切換到你的anaconda安裝目錄并進入Scripts文件夾內(nèi)(D:\Apps\anaconda3\Scripts)
運行以下代碼:
conda install pip
如果出現(xiàn)下圖:
原因是之前我更改多默認(rèn)源了,我們可以改其他倉庫源,這里我恢復(fù)官方默認(rèn)源,
conda config --remove-key channels
然后再執(zhí)行上面代碼即可
當(dāng)然你可以切換到其他源,如:
1(清華源)
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
2(中科大源)
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/bioconda/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/menpo/
3.2 Python:
如果有的同學(xué)只是裝Python的話同樣切換到你的Python安裝目錄的Scripts下
然后執(zhí)行以下操作
easy_install pip
- easy_install 打包和發(fā)布 Python 包
- pip是包管理指令
四 測試是否成功
運行查看庫指令:文章來源:http://www.zghlxwxcb.cn/news/detail-612593.html
pip list
代表我們成功了?。。?span toymoban-style="hidden">文章來源地址http://www.zghlxwxcb.cn/news/detail-612593.html
到了這里,關(guān)于Script file ‘F:.....\pip-script.py‘ is not present 原因及解決辦法的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!