美文网首页
Mac中 pip3 install mysqlclient 报错

Mac中 pip3 install mysqlclient 报错

作者: shenguanjiejie | 来源:发表于2019-02-28 16:52 被阅读0次

主要错误提示如下:

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

最下方的报错是:


image.png

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

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

相关文章

网友评论

      本文标题:Mac中 pip3 install mysqlclient 报错

      本文链接:https://www.haomeiwen.com/subject/rqlkuqtx.html