命令python setup.py egg_info失败,错误代码为1 [英] Command python setup.py egg_info failed with error code 1

查看:333
本文介绍了命令python setup.py egg_info失败,错误代码为1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试执行make install,但是我一直遇到错误.我已经尝试按照以下答案进行操作:无法通过pip安装,因为egg_info错误的提示

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

完整的调试日志: http://pastebin.com/cnGgWU4G

这是Makefile:

Here’s the Makefile:

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

该问题似乎仅在虚拟环境中发生.我可以毫无问题地执行pip install mysql-python,但是尝试安装mysql-python

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如下:

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.

首先,由于某些原因,MySQL-python版本1.2.4无法安装.将其更改为1.2.5可修复该错误.

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

第二,argparse无法按原样安装.它需要--allow-all-external.新的Makefile如下:

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

第三,mysql-connector-python版本1.0.12不存在.将其更改为1.1.4即可.

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

这篇关于命令python setup.py egg_info失败,错误代码为1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆