Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Command python setup.py egg_info failed with error code 1

Tags:

python

pip

I am trying to do make install, but I keep getting an error. I already tried following this answer: Can't install via pip because of egg_info error

Command python setup.py egg_info failed with error code 1 in /abc/abc_env/build/MySQL-python
Storing debug log for failure in /Users/Pat/.pip/pip.log

the full debug log: http://pastebin.com/cnGgWU4G

Here’s the Makefile:

virtualenv-2.7 my_env && \
source my_env/bin/activate && \
pip install -r requirements.txt

It looks like the problem only happens in the virtual environment. I am able to do pip install mysql-python without a problem, but pip install -r requirements.txt has errors when trying to install mysql-python

requirements.txt below:

Flask==0.10.1
Jinja2==2.7.1
MarkupSafe==0.18
MySQL-python==1.2.4
PyYAML==3.10
SQLAlchemy==0.8.3
Tempita==0.5.1
Werkzeug==0.9.4
argparse==1.2.1
dataset==0.3.13
decorator==3.4.0
docopt==0.4.0
itsdangerous==0.23
mandrill==1.0.53
mysql-connector-python==1.0.12
requests==2.0.1
sqlalchemy-migrate==0.7.2
wsgiref==0.1.2
like image 799
Patrick Yan Avatar asked Feb 02 '14 22:02

Patrick Yan


Video Answer


1 Answers

There were several problems with the original code.

First, MySQL-python version 1.2.4 for some reason fails to install. Changing this to 1.2.5 fixes that error.

Second, argparse cannot be installed as is. It needs --allow-all-external. The new Makefile is below:

virtualenv-2.7 my_env && \
source my_env/bin/activate && \
pip install -r requirements.txt --allow-all-external

Third, mysql-connector-python version 1.0.12 doesn’t exist. Changing it to 1.1.4 worked.

like image 77
Patrick Yan Avatar answered Oct 21 '22 18:10

Patrick Yan