繁体   English   中英

在 Mac(终端)上安装 mysqlclient 时出错

[英]Getting error while installing mysqlclient on Mac ( Terminal )

我正在尝试在我的 Mac 上安装 mysqlclient 以将 MySQL 数据库连接到 django 的网站,但我总是遇到命令错误:

pip install mysqlclient

错误:

ERROR: Could not find a version that satisfies the requirement mysqlclient (from versions: 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.3.7, 1.3.8, 1.3.9, 1.3.10, 1.3.11rc1, 1.3.11, 1.3.12, 1.3.13, 1.3.14, 1.4.0rc1, 1.4.0rc2, 1.4.0rc3, 1.4.0, 1.4.1, 1.4.2, 1.4.2.post1, 1.4.3, 1.4.4, 1.4.5, 1.4.6, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.1.0rc1, 2.1.0). ERROR: No matching distribution found for mysqlclient

我什至尝试安装特定版本的 mysqlclient:

pip install mysqlclient==2.0.0

但我仍然得到一个错误。

检查 output:

mysql_config --libs

如果没有错误,请尝试以下命令(否则安装 mysql):

python3 -m pip install --upgrade pip
pip3 install --upgrade setuptools
pip3 install mysqlclient==2.0.0

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM