我最近经常尝试使用pip安装Python软件包时发现这一点收到以下错误。
我在网上找到了一个参考,该参考必须从下载目录中使用“ python2 setup.py install ”,并且确实发现,如果我手动找到并下载了该软件包(从pypi),它将可以正常工作。
但是,我不知道pip将软件包下载到何处,和/或为什么这种方式会失败。
我尝试进行pip升级,但是它也以类似的方式失败,出现了一系列“未知分发选项”错误(entry_points,zip_safe,test_suite,tests_require)!
- 点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