【发布时间】:2019-10-25 06:39:49
【问题描述】:
pip install mysqlclient failed: fatal error: sys/types.h: no such file or directory...command 'gcc' failed with exit status 1
我正在使用 sqlalchemy 为 mysql 创建引擎。收到错误“ImportError:没有名为 MySQLdb 的模块”。然后我尝试 pip install mysqlclient 但遇到了这个问题。根据我的研究,sys/types.h 应该在 /usr/include/sys 中找到,但我在 /usr 中没有包含文件夹。尝试 brew install mysql-connector-c 成功但没有解决问题。
我使用的是 macOS Mojave(V10.14)
【问题讨论】:
标签: mysql-python