RHEL8 mysqlclient 安装:gcc 失败,退出代码为 1 (Python.h) [Python3.9]

问题描述 投票:0回答:0

我正在尝试在 RHEL8 (EPEL8) 上使用 Python3.9 安装 mysqlclient,这样我就可以在我的服务器上使用 MariaDB,但是运行时

pip3 install mysqlclient
我得到一个错误:

MySQLdb/_mysql.c:46:10: fatal error: Python.h: No such file or directory
     #include "Python.h"
              ^~~~~~~~~~
    compilation terminated.
    error: command '/usr/bin/gcc' failed with exit code 1
    ----------------------------------------

我已经阅读了其他我需要的问题

python3-dev
,但这似乎在 RHEL8 上不可用(不再)。
mariadb-devel
mariadb
已经安装。我有什么选择?

mysql python-3.x gcc mariadb rhel
© www.soinside.com 2019 - 2024. All rights reserved.