当前位置:Gxlcms > 数据库问题 > Mac中 pip3 install mysqlclient 报错

Mac中 pip3 install mysqlclient 报错

时间:2021-07-01 10:21:17 帮助过:36人阅读

-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

 

Mac中 pip3 install mysqlclient 报错

标签:flags   openssl   images   error   voc   nal   ati   command   stat   

人气教程排行