Mac中 pip3 install mysqlclient 报错

主要错误提示如下:

ld: library not found for -lssl
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  error: command ‘clang‘ failed with exit status 1

  ----------------------------------------
  Failed building wheel for mysqlclient
  Running setup.py clean for mysqlclient

最下方的报错是:

这个错误百度+Google查了很久都没有找到正确的解决方法,浪费了很多时间,使得我认为非常有必要把解决方法写出来,防止再有其他人浪费生命.真不知道为什么很少有人遇到和我同样的错误,唯一的解决方法是使用下方命令进行安装:

LDFLAGS=-L/usr/local/opt/openssl/lib pip3 install mysqlclient

下面是我的实例,在虚拟环境中安装的

LDFLAGS=-L/usr/local/opt/openssl/lib pip install mysqlclient

参考链接:https://github.com/PyMySQL/mysqlclient-python/issues/131

原文地址:https://www.cnblogs.com/zmdComeOn/p/12016391.html

时间: 2024-08-30 11:27:04

Mac中 pip3 install mysqlclient 报错的相关文章

docker中pip install/uninstall报错

docker中pip install or uninstall报错 事件起因 今天开发同学咨询了一个问题,他说在docker的一个运行容器中执行如下命令: cd /usr/lib/python2.7/site-packages/ 该目录下有两个目录,分别是:smart_open 和 samrt_open-1.5.5-py2.7.egg-info rm -rf samrt_open-1.5.5-py2.7.egg-info/ 这时出现报错,报错信息如下: rm: cannot remove 'sm

pip install mysqlclient报错(OSError: mysql_config not found)

报错截图 一般情况是系统没有安装libmysqld-dev 执行 sudo apt install libmysqld-dev完成安装后再 pip install mysqlclient就可以了(系统环境Ubuntu18.04) 原文地址:https://www.cnblogs.com/IT-Crowd/p/11742384.html

mac下pip install lxml报错

解决方法: brew install libxml2 xcode-select --install sudo pip install lxml -i http://pypi.v2ex.com/simple

pip 安装mysqlclient报错OSError: mysql_config not found

执行 pip install mysqlclient 报错信息如下: [[email protected] bin]# 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: command not found Tracebac

mac下python3.6安装mysqlclient报错mysql_config: command

用mac在python3.6的环境下学习django,按照官网的步骤,却无法安装mysqlclient.报错mysql_config: command not found. 命令如下: $ pip3 install mysqlclient pip3是因为有两个python版本,给python3.6对应的pip起了个别名.不然提示找不到.报错如下: Collecting mysqlclient Using cached mysqlclient-1.3.12.tar.gz Complete outp

mac brew install redis 报错

mac brew install redis 报错 /usr/local/opt/php55/bin/phpize /usr/local/opt/php55/bin/phpize: line 61: /usr/local/Library/ENV/4.3/sed: No such file or directory /usr/local/opt/php55/bin/phpize: line 62: /usr/local/Library/ENV/4.3/sed: No such file or di

MyEclipse中jsp的注释报错解决

jsp页面中注释报错: 出错现场:在eclipse中没有报错,在MyEclipse中报错. <!-- To use express install, set to playerProductInstall.swf, otherwise the empty string. --> Myeclipse的js中不会识别这样的标识 需要改成: //  To use express install, set to playerProductInstall.swf, otherwise the empty

mac brew 安装php扩展报错:parent directory is world writable but not sticky

$ brew install php70-mcrypt 报错: Error: parent directory is world writable but not sticky 搜索到github的答案 https://github.com/Homebrew/legacy-homebrew/issues/40345 原因:/tmp目录权限不对 $ ls -ld /private/tmp 打印出来 /private/tmp 被标黄了 解决办法: $ sudo chmod +t /tmp $ ls

python3 &nbsp; 安装mysql-client 报错 mysql_config not found (py3 centos7)

centos7 pip3安装mysql-client时报错 "mysql_config not found " 459  yum -y install libmysqlclient-dev 460  yum -y install libmysqlclient-devel 464  yum -y install libmysqlclient-devel 473  yum -y install mysql-python 474  yum install python-devel 475