peteremperor

# sudo pip install mysql-python

此时会提示找不到mysql-config文件,我们安装一下mysql-community-devel

# sudo yum install -y mysql-community-devel

完成之后 ,重新来一遍 sudo pip install mysql-python,之后又提示我电脑缺少gcc编译工具和缺少Python.py文件。异常如下:

_mysql.c:29:20: fatal error: Python.h: No such file or directory #include "Python.h" ^ compilation terminated. error: command \'gcc\' failed with exit status 1

那好安装gcc:

# sudo yum install -y gcc

安装Python.py依赖模块:

# sudo yum install python-devel

解决了之后

sudo pip install mysql-python

成功安装。

分类:

技术点:

相关文章:

  • 2021-12-02
  • 2021-05-31
  • 2022-12-23
  • 2021-09-17
  • 2021-04-22
  • 2022-01-28
  • 2021-12-04
猜你喜欢
  • 2021-12-02
  • 2021-09-30
  • 2021-09-17
  • 2022-12-23
  • 2021-12-02
  • 2021-09-17
  • 2021-06-09
相关资源
相似解决方案