首页 > 解决方案 > 尝试下载 mysqlclient 时出现 gcc 错误

问题描述

我一直在尝试将 python 模型迁移到 mysql 数据库中。每当我在终端中发出以下命令时:

(sl_env) Nolans-MBP:student_loans NolanMorrow$ python3 manage.py makemigrations 

我明白了

django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.13 or newer is required; you have 0.9.3.'''

在这一点上我进入

(sl_env) Nolans-MBP:student_loans NolanMorrow$ pip3 install mysqlclient

并得到以下错误。

Running setup.py install for mysqlclient ... error

...

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

标签: pythonmysqldjango

解决方案


推荐阅读