我是macos用户 无法安装mysqlclient

来源:3-5 数据库安装及依赖安装

夏冬之Python

2018-11-21

利用pycharm本身的安装无法安装
利用pip install mysqlclient也无法安装。。。。
图片描述

写回答

1回答

NavCat

2018-11-21

你的图二跟图三传的是一样的呀,有没有更详细的错误截图。我猜测可能是你xcode的原因,试试下面的方法:

在终端中执行如下命令:
xcode-select --install

0
4
夏冬之Python
回复
NavCat
换了python3.5的解释器 依然没有解决问题 老师 build/temp.macosx-10.6-intel-3.5/_mysql.o -L/usr/local/mysql/lib -lmysqlclient -lssl -lcrypto -o build/lib.macosx-10.6-intel-3.5/_mysql.cpython-35m-darwin.so ld: library not found for -lssl clang: error: linker command failed with exit code 1 (use -v to see invocation) error: command '/usr/bin/clang' failed with exit status 1 ---------------------------------------- Command "/Users/liuchen/py3/bin/python3 -u -c "import setuptools, tokenize;__file__='/private/var/folders/sq/t_khqq1s59zbts_2c1lbr_zh0000gp/T/pip-install-bhunu_d9/mysqlclient/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/sq/t_khqq1s59zbts_2c1lbr_zh0000gp/T/pip-record-7pfilp1n/install-record.txt --single-version-externally-managed --compile --install-headers /Users/liuchen/py3/bin/../include/site/python3.5/mysqlclient" failed with error code 1 in /private/var/folders/sq/t_khqq1s59zbts_2c1lbr_zh0000gp/T/pip-install-bhunu_d9/mysqlclient/
2018-11-24
共4条回复

手把手教你把Python应用到实际开发 不再空谈语法

学会项目开发思路,掌握Python高阶用法。

1341 学习 · 244 问题

查看课程