I find that recently often when I try to install a Python package using pip, I get the error(s) below.
I found a reference online that one has to use "python2 setup.py install" from the download directory, and indeed find that this will then work if I manually find and download the package (from pypi).
But, I don't know where pip is downloading packages to, and/or why it is failing in this manner.
I tried to do a pip upgrade, but it also failed in a similar manner, with a bunch of "Unknown distribution option" errors (entry_points, zip_safe, test_suite, tests_require)!
- pip 1.0.1
- ActivePython 2.7
Trying to use ActiveState's pypm fails, because they have a smaller library base, and it doesn't include these packages.
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'
I know this is an older question but here are the steps I used to get
cassandra-driver
to actually install on Windows 7 / Python2.I have windows 10 / Python3 at home where I will test this tonight.I have confirmed this also works on Windows 10 with both Python 2 and 3.Problem
TL;DR Solution
Solution (I'd love for someone to explain why this worked)
pip install cassandra-driver
and got the above error messagepip install --pre cassandra-driver
and got the following errorMicrosoft Visual C++ Compiler for Python 2.7
pip install --pre cassandra-driver
pip uninstall cassandra-driver
pip install cassandra-driver
To reiterate, I'm not really sure why this worked. Right now my two leading conclusions are that either the C++ compiler is required or that running the
--pre
option the first time installed some dependencies that were missing from the 'regular' install. I'll update tonight after work when I have more details.sudo apt-get install apache2-dev
solved my problemAs distribute has been merged back into setuptools, it is now recommended to install/upgrade setuptools instead:
Install distribute, which comes withegg_info
.Should be as simple as
pip install Distribute
.Distribute has been merged into Setuptools as of version 0.7. If you are using a version <=0.6, upgrade using
pip install --upgrade setuptools
oreasy_install -U setuptools
.I had this issue, as well as some other issues with Brewed Python on OS X v10.9 (Mavericks).
didn't work for me, and I think my setuptools/distribute setup was botched.
I finally got it to work by running
pip install -U setuptools
andeasy_install
was putting egg-info in the wrong directory.Then I just reinstalled
apt-get install python-dev
. Let me install the drivers I want after that