我發現最近經常當我嘗試安裝Python包使用pip,我得到下面的錯誤(S)。Python的點子安裝失敗:無效的命令egg_info
我發現了一個參考網上一個人必須使用「python2的setup.py安裝」從下載目錄,果然發現這會工作,那麼如果我手動查找和下載包(一封來自PyPI)。
但是,我不知道pip是在哪裏下載軟件包,和/或爲什麼它以這種方式失敗。
我試圖做一個點子升級,但它也失敗了類似的方式,與一堆「未知的分佈選項」錯誤(entry_points,zip_safe,test_suite,tests_require)!
- PIP 1.0.1
- ActivePython 2.7
嘗試使用ActiveState的pypm失敗了,因爲他們有一個小圖書館基礎,它不包括這些軟件包。
C:\test>pip install requests-oauth
Downloading/unpacking requests-oauth
Downloading requests-oauth-0.4.1.tar.gz
Running setup.py egg_info for package requests-oauth
E:\Plang\ActivePython\lib\distutils\dist.py:267: UserWarning: Unknown distribution option: 'zip_safe'
warnings.warn(msg)
E:\Plang\ActivePython\lib\distutils\dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
warnings.warn(msg)
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: invalid command 'egg_info'
Complete output from command python setup.py egg_info:
E:\Plang\ActivePython\lib\distutils\dist.py:267: UserWarning: Unknown distribution option: 'zip_safe'
warnings.warn(msg)
E:\Plang\ActivePython\lib\distutils\dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
warnings.warn(msg)
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: invalid command 'egg_info'
對我來說,它安裝'python-dev' – lmaooooo 2016-04-15 15:31:00