pip install 提示"no previously-included directories found matching"及"no previously-included files matching found anywhere in distribution",且偶發無法關聯安裝 PyPI 庫的故障


環境描述:

Python 2.7.5
CentOS-7.2
 
報錯現象:
(1).在虛擬環境下運行 pip install 命令安裝 PyPI 第三方庫,出現類似如下告警。
Running setup.py egg_info for package Werkzeug
    no previously-included directories found matching 'docs/_build'
    no previously-included directories found matching 'docs/_themes'
    warning: no previously-included files matching '*.py[cdo]' found anywhere in distribution
    warning: no previously-included files matching '__pycache__' found anywhere in distribution
    warning: no previously-included files matching '*.so' found anywhere in distribution
(2).偶發無法關聯安裝 PyPI 庫的故障。
例如:安裝 python-daemon (2.1.2) 需要先安裝 docutils (0.14) 及 lockfile (0.12.2)。而故障發生時,無法自動安裝關聯 PyPI 庫。
(3).檢查虛擬環境 pip 版本,發現版本較低。
例如:虛擬環境下 pip 版本為 1.4.1,非虛擬環境下 pip 版本為 9.0.1。
 
報錯原因:
pip 版本過低,導致安裝報錯。
 
報錯處理方法:
升級 pip 工具,語句類似如下。
#> pip install pip==9.0.1
隨后,可通過 pip list 命令進行檢查。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM