Command python setup.py egg_info failed with error

2019-03-09 03:30发布

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

标签: python pip
3条回答
Viruses.
2楼-- · 2019-03-09 04:03

try this

sudo apt-get install libmysqlclient-dev
查看更多
Anthone
3楼-- · 2019-03-09 04:16

If above answer do not do the trick. Try the following.

  1. Install the MySQL. (http://dev.mysql.com/downloads/)
  2. Add the path. export PATH=${PATH}:/usr/local/mysql/bin

Now, run pip install -r requirements.txt

查看更多
走好不送
4楼-- · 2019-03-09 04:17

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.

查看更多
登录 后发表回答