4

虚拟环境下安装mysql-python

 2 years ago
source link: https://www.hi-roy.com/posts/%E8%99%9A%E6%8B%9F%E7%8E%AF%E5%A2%83%E4%B8%8B%E5%AE%89%E8%A3%85mysql-python/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

虚拟环境下安装mysql-python

2014-03-12

使用virtualenv虚拟环境的时候,mysql-python安装时报错:

_mysql.c:44:23: fatal error: my_config.h: No such file or directory
 #include "my_config.h"
                       ^
compilation terminated.
error: command 'gcc' failed with exit status 1

我的系统是fedora20,解决方法就是安装mariadb-devel

如果是ubuntu的话,应该是有个libmysqlclient-dev,安装后就可以在虚拟环境下安装mysql-python了。

Roy avatar
About Roy
野生程序猿,略懂Python,略懂Golang,略懂云计算,略懂大数据,略懂拳击游泳钓鱼,略懂钢琴吉他摄影。

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK