GVKun编程网logo

python setup.py egg_info mysqlclient

29

在这篇文章中,我们将为您详细介绍pythonsetup.pyegg_infomysqlclient的内容。此外,我们还会涉及一些关于centos7安装mysqlclient报错ERROR:Comman

在这篇文章中,我们将为您详细介绍python setup.py egg_info mysqlclient的内容。此外,我们还会涉及一些关于centos7 安装 mysqlclient 报错 ERROR: Command errored out with exit status 1: python setup.py egg_info Check、Command "python setup.py egg_info" failed with error code 1、Command "python setup.py egg_info" failed with error code 1 in、Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-fn_dwf1b/MySQL-python/的知识,以帮助您更全面地了解这个主题。

本文目录一览:

python setup.py egg_info mysqlclient

python setup.py egg_info mysqlclient

尝试在Python 3.6.0上使用pip3安装mysqlclient

$ pip3 install mysqlclientCollecting mysqlclient  Using cached mysqlclient-1.3.10.tar.gz    Complete output from command python setup.py egg_info:    Traceback (most recent call last):      File "<string>", line 1, in <module>      File "/private/var/folders/3k/08g3yx_12kg99kyfs989md600000gn/T/pip-build-1qv_89jc/mysqlclient/setup.py", line 17, in <module>        metadata, options = get_config()      File "/private/var/folders/3k/08g3yx_12kg99kyfs989md600000gn/T/pip-build-1qv_89jc/mysqlclient/setup_posix.py", line 54, in get_config        libraries = [dequote(i[2:]) for i in libs if i.startswith(''-l'')]      File "/private/var/folders/3k/08g3yx_12kg99kyfs989md600000gn/T/pip-build-1qv_89jc/mysqlclient/setup_posix.py", line 54, in <listcomp>        libraries = [dequote(i[2:]) for i in libs if i.startswith(''-l'')]      File "/private/var/folders/3k/08g3yx_12kg99kyfs989md600000gn/T/pip-build-1qv_89jc/mysqlclient/setup_posix.py", line 12, in dequote        if s[0] in "\"''" and s[0] == s[-1]:    IndexError: string index out of range    ----------------------------------------Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/3k/08g3yx_12kg99kyfs989md600000gn/T/pip-build-1qv_89jc/mysqlclient/

已经做了

brew install mysql-connector-c

但是仍然出现此错误

答案1

小编典典

这为我工作:

  1. brew install mysql-connector-c

  2. 编辑mysql_config(找到它:which mysql_config

在mysql_config中更正此错误:

# Create options libs="-L$pkglibdir"libs="$libs -l "

应该是:

# Create options libs="-L$pkglibdir"libs="$libs -lmysqlclient -lssl -lcrypto"
  1. brew info openssl
  2. 最后 pip3 install mysqlclient

centos7 安装 mysqlclient 报错 ERROR: Command errored out with exit status 1: python setup.py egg_info Check

centos7 安装 mysqlclient 报错 ERROR: Command errored out with exit status 1: python setup.py egg_info Check

报错:ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

在这里插入图片描述

  • 解决方案
    ln -s /usr/local/mysql/bin/mysql_config /usr/local/bin/mysql_config
    
  • 还是报错
    yum install mysql-devel
    

Command

Command "python setup.py egg_info" failed with error code 1

 

D:\Program Files\python_3_6_4>python -m pip install --upgrade pip
Cache entry deserialization Failed, entry ignored
Collecting pip
  Cache entry deserialization Failed, entry ignored
  Downloading https://files.pythonhosted.org/packages/a4/6d/6463d49a933f547439d6b5b98b46af8742cc03ae83543e4d7688c2420f8b/pip-21.3.1-py3-none-any.whl (1.7MB)
    100% |████████████████████████████████| 1.7MB 299kB/s
Installing collected packages: pip
  Found existing installation: pip 9.0.1
    Uninstalling pip-9.0.1:
      Successfully uninstalled pip-9.0.1
Successfully installed pip-21.3.1

 

特别注意:

如果安装了多个版本的python

要在正确的位置(目录,文件夹)执行 python -m pip install --upgrade pip

 

Command

Command "python setup.py egg_info" failed with error code 1 in

使用 docker build -t $docker_name:test1.0 .建立docker image 出现如下错误:image
原因:base image的pip版本过低,在Dockerfile中pip install 命令之前加入以下命令:RUN pip install --upgrade pip

则问题解决:docker镜像创建成功

Command

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

pip3 install MySQL-python
Collecting MySQL-python
  Using cached 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-fn_dwf1b/MySQL-python/setup.py", line 13, in <module>
        from setup_posix import get_config
      File "/tmp/pip-build-fn_dwf1b/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-fn_dwf1b/MySQL-python/
 

关于python setup.py egg_info mysqlclient的介绍已经告一段落,感谢您的耐心阅读,如果想了解更多关于centos7 安装 mysqlclient 报错 ERROR: Command errored out with exit status 1: python setup.py egg_info Check、Command "python setup.py egg_info" failed with error code 1、Command "python setup.py egg_info" failed with error code 1 in、Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-fn_dwf1b/MySQL-python/的相关信息,请在本站寻找。

本文标签: