Complete output from command python setup.py egg_info:
/bin/sh: mysql_config: command not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/ww/hnzjh2z517d72m15ybyhwkbw0000gn/T/pip-build-mvq09hkr/mysqlclient/setup.py", line 17, in <module>
metadata, options = get_config()
File "/private/var/folders/ww/hnzjh2z517d72m15ybyhwkbw0000gn/T/pip-build-mvq09hkr/mysqlclient/setup_posix.py", line 44, in get_config
libs = mysql_config("libs_r")
File "/private/var/folders/ww/hnzjh2z517d72m15ybyhwkbw0000gn/T/pip-build-mvq09hkr/mysqlclient/setup_posix.py", line 26, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
OSError: mysql_config not found
解决办法:
安装mysql-connector-c:
brew install mysql-connector-c
如果电脑没有安装brew,按照以下方式安装brew,再安装mysql-connector-c:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
再次安装mysqlclient:
pip install mysqlclient
发现报了一个新的错误:
Collecting 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/rv/a_a/T/pip-build-nyaa8t95/mysqlclient/setup.py", line 17, in <module>
metadata, options = get_config()
File "/private/var/folders/rv/a_a/T/pip-build-nyaa8t95/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/rv/a_a/T/pip-build-nyaa8t95/mysqlclient/setup_posix.py", line 54, in <listcomp>
libraries = [dequote(i[2:]) for i in libs if i.startswith('-l')]
File "/private/var/folders/rv/a_a/T/pip-build-nyaa8t95/mysqlclient/setup_posix.py", line 12, in dequote
if s[0] in "\"'" and s[0] == s[-1]:
IndexError: string index out of range
解决办法:修改mysql-config文件:
cd /usr/local/Cellar/mysql-connector-c/6.1.11/bin/ # 备份 cp mysql_config mysql_config.bak chmod u+w mysql_config vi mysql_config # :114 找到第114行 # 将 # libs="$libs -l " # 替换为 # libs="$libs -lmysqlclient -lssl -lcrypto" #保存
再次安装mysqlclient:
pip install mysqlclient
成功!
相关推荐
Django连接MySQL数据库需要依赖第三方库mysqlclient,然而服务器通过pip3 install mysqlclient 命令安装第三方库mysqlclient时会经常报错: ERROR: Command errored out with exit status 1: command: /home/bright...
然后报错:OSError: mysql_config not found 找到官方文档 https://github.com/PyMySQL/mysqlclient-python,解释说安装前需安装另一个模块: brew install mysql-connector-c 但是报错: 查看报错信息,在安装 ...
title: "解决Mac下安装mysqlclient报错"将mysql_config链接到/usr/local/bin目录下再次执行 pip3 install
将下载的MySQL-python-1.2.5的文件解压,然后打开编辑器编辑setup_posix,其中有一行mysql_config.path = "mysql_config",改为mysql_config.path = "/usr/local/Cellar/mysql-connector-c/6.1.11/bin/mysql_config...
C#例子代码 A0185_MySQL_MySqlClientC#例子代码 A0185_MySQL_MySqlClientC#例子代码 A0185_MySQL_MySqlClientC#例子代码 A0185_MySQL_MySqlClientC#例子代码 A0185_MySQL_MySqlClientC#例子代码 A0185_MySQL_...
MYSQL 帮助: A.2.3 Client does not support authentication protocol MySQL 4.1 and up uses an authentication protocol based on a password hashing algorithm that is incompatible with that used by older ...
python和数据库交互的不二之选(mysqldb在windows和Linux安装报错时的解决方法,内含linux需要的安装资源)
主要给大家介绍了关于MySQL连接抛出Authentication Failed错误的分析与解决方法,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
python MySQL-python模块 django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb. Did you install mysqlclient or MySQL-python
python 3.7 对应的SQL数据库:mysqlclient-1.4.6-cp37-cp37m-win_amd64
mysql vc++ lib,mysql.h和mysqlclient.lib静态库
mysql客户端 该项目是。 该项目增加了对Python 3的支持并修复了许多错误。 PyPI: ://pypi.org/project/mysqlclient/ GitHub: : 支持 不要使用Github Issue Tracker... 安装MySQL和mysqlclient: # Assume you
DCMAKE_INSTALL_PREFIX=/path.../gcc_64 -DMySQL_INCLUDE_DIR="/path.../include/mysql" -DMySQL_LIBRARY="path.../libmysqlclient.so"(Windows:lib/mysqlclient.lib) cmake --build . cmake --install .
安装完成该组件后,引用命名空间MySql.Data.MySqlClient; 使用命令行编译时:csc /r:MySql.Data.dll test.cs 下载地址: http://dev.mysql.com/downloads/connector/net/1.0.html 方法二: 通过ODBC访问...
Python链接MySQL驱动包,安装之后可以使用Python语言链接MySQL进行数据库操作 # mysqlclient [![Build Status](https://secure.travis-ci.org/PyMySQL/mysqlclient-python.png)]...
1. 添加MySQL Yum源 MySQL官网>DOWNLOADS>MySQL Yum Repository找到合适版本的yum源 $wget https://dev.mysql.com/get/mysql80-community-release-el7-2.noarch.rpm $sudo rpm -Uvh mysql80-community-release-el7...
Python 3.x MySQL驱动(mysqlclient)安装方法:(pip install mysqlclient-1.3.13-cp36-cp36m-win_amd64.whl)
MySQL编译文件直接下载安装mysqlclient-1.3.7-cp35-none-win_amd64.whl 只使用于python3.5! 其他python需要相应版本的。
mysqlclient-1.3.13各种版本,主要解决问题执行:pip install pymysql,报错问题。