問題描述
今天在使用以下指令時,出現了奇怪的錯誤:
pip install -e .
錯誤如下:
Directory '.' is not installable. File 'setup.py' not found.
You are using pip version 9.0.1, however version 23.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
通過查找資料及閱讀錯誤說明,猜測是pip版本過低所緻。
按照錯誤提示運作
python -m pip install --upgrade pip
出現了以下錯誤,似乎是鏡像網站上沒有找到合适的下載下傳源。
Cache entry deserialization failed, entry ignored
Could not fetch URL https://pypi.tuna.tsinghua.edu.cn/simple/pip/: There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:748) - skipping
解決方案
換個下載下傳源繼續更新pip:
python -m pip install --upgrade pip -i https://pypi.douban.com/simple
成功安裝!
可用以下指令檢視目前pip版本:
pip -V
參考連結
【python初級】 windows10上更新pip_windows pip更新_jn10010537的部落格-CSDN部落格