python setup.py egg_info_命令python setup.py egg_info失败,错误代码为1

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

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

解决方案

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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值