简体   繁体   English

命令“ 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/

I can not install the mysqlclient in CentOS7.2 using pip: 我无法使用pip在CentOS7.2中安装mysqlclient

$ pip install "mysqlclient"
Collecting mysqlclient
  Using cached mysqlclient-1.3.12.tar.gz
    Complete output from command python setup.py egg_info:
    /bin/sh: mysql_config: did not found the command
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-hg0dbjgz/mysqlclient/setup.py", line 17, in <module>
        metadata, options = get_config()
      File "/tmp/pip-build-hg0dbjgz/mysqlclient/setup_posix.py", line 44, in get_config
        libs = mysql_config("libs_r")
      File "/tmp/pip-build-hg0dbjgz/mysqlclient/setup_posix.py", line 26, in mysql_config
        raise EnvironmentError("%s not found" % (mysql_config.path,))
    OSError: mysql_config not found

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-hg0dbjgz/mysqlclient/

And I have install my MySQL correctly in my server. 而且我已经在服务器中正确安装了MySQL。

$ mysql --version
mysql  Ver 14.14 Distrib 5.6.38, for Linux (x86_64) using  EditLine wrapper

But I can not install 但是我无法安装

You should install the python-devel and mysql devel first use yum: 您应该先使用yum安装python-develmysql devel

yum install python-devel mysql-community-devel -y

then you can install mysqlclient 然后您可以安装mysqlclient

暂无
暂无

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

相关问题 命令“ python setup.py egg_info”在/ tmp / pip-install-jsegcbha / mysqlclient /中失败,错误代码为1 - Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-install-jsegcbha/mysqlclient/ 命令“python setup.py egg_info”在 /tmp/pip-install-fs0wmmw4/mysqlclient/ 中失败,错误代码为 1 - Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-fs0wmmw4/mysqlclient/ 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-dlih6aks/MarkupSafe/ 中失败,错误代码为 1 - Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-dlih6aks/MarkupSafe/ 命令“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/ 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
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM