简体   繁体   English

命令“python setup.py egg_info”在 /tmp/pip-build-tu6ygqzj/mysql-python/ 中失败,错误代码为 1

[英]Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-tu6ygqzj/mysql-python/

I am using python3 to install mysql-python package.我正在使用 python3 安装 mysql-python 包。 So, when I run所以,当我跑

pip install mysql-python, pip 安装 mysql-python,

it gives me error.它给了我错误。

Tried using尝试使用

pip install --upgrade setuptools pip install --upgrade 安装工具

It shows表明

Collecting mysql-python
  Using cached https://files.pythonhosted.org/packages/a5/e9/51b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-tu6ygqzj/mysql-python/setup.py", line 13, in <module>
        from setup_posix import get_config
      File "/tmp/pip-build-tu6ygqzj/mysql-python/setup_posix.py", line 2, in <module>
        from ConfigParser import SafeConfigParser
    **ImportError: No module named 'ConfigParser'**

----------------------------------------
***Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-tu6ygqzj/mysql-python/***

Successfully installed with all files in it.成功安装,其中包含所有文件。

I guess you need to install the following:我想您需要安装以下内容:

pip install mysqlclient 

In Python 3, ConfigParser has been renamed to configparser for PEP 8 compliance.在 Python 3 中, ConfigParser已重命名为configparser以符合 PEP 8。

mysqlclient is a fork of mysql-python , with Python 3 support. mysqlclientmysql-python一个分支,支持 Python 3。

Kindly make sure you have installed the following before installing mysqlclient :在安装mysqlclient之前,请确保您已安装以下内容:

sudo apt-get install python3-dev libmysqlclient-dev

For Lunix and Mac Machines, install the mysqlclient pre-requisites via:对于 Lunix 和 Mac 机器,通过以下方式安装 mysqlclient 先决条件:

Debian / Ubuntu - sudo apt-get install python-dev default-libmysqlclient-dev Debian / Ubuntu - sudo apt-get install python-dev default-libmysqlclient-dev

Red Hat / CentOS - sudo yum install python-devel mysql-devel Red Hat / CentOS - sudo yum install python-devel mysql-devel

macOS (Homebrew) - brew install mysql-client macOS (Homebrew) - brew install mysql-client

我尝试在此之前执行此操作,因此在此之后它命令工作:

apt-get install libmysqlclient-dev

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Python - 命令“python setup.py egg_info”在 /tmp/pip-build-21ft0H/pandas 中失败,错误代码为 1 - Python - Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-21ft0H/pandas 无法安装Django:命令“python setup.py egg_info”失败,错误代码1在/ tmp / pip-build-rcF9a5 / Django / - Trouble installing Django: Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-rcF9a5/Django/ 命令“ python setup.py egg_info”在/ tmp / pip-build-hg0dbjgz / mysqlclient /中失败,错误代码为1 - Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-hg0dbjgz/mysqlclient/ 命令“python setup.py egg_info”在 /tmp/pip-build-dlih6aks/MarkupSafe/ 中失败,错误代码为 1 - Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-dlih6aks/MarkupSafe/ InstallationError:/ tmp / pip-build-Jr1szu / Django /中的命令“ python setup.py egg_info”失败,错误代码为1 - InstallationError: Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-Jr1szu/Django/ ctcdecode 安装失败 - 命令“python setup.py egg_info”在 /tmp/pip-req-build-7zcjual1/ 中失败,错误代码为 1 - ctcdecode install fail - Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-req-build-7zcjual1/ 命令“python setup.py egg_info”在 /tmp/pip-build-hn4hol_z/spacy/ 中失败,错误代码为 1 - Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-hn4hol_z/spacy/ 命令“python setup.py egg_info”失败,/tmp/pip-build-e7AmlG/django-filter 中的错误代码为 1 - Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-e7AmlG/django-filter 运行pip install mysql-python时出错:“python setup.py egg_info”失败,错误代码为1 - Error occurred when running pip install mysql-python: “python setup.py egg_info” failed with error code 1 配置返回的代码256 - python setup.py egg_info失败,错误代码为1 / tmp / pip_build_root / lxml - configure returned code 256 - python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/lxml
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM