views:

74

answers:

2

I'm trying to install MySQLdb for python. but when I run the setup, this is the error I get.

well I know why its giving all the missing file statements, but dont know where to change the bold marked location from.

Please help

gaurav-toshniwals-macbook-7:MySQL-python-1.2.3c1 gauravtoshniwal$ python setup.py build
running build
running build_py
copying MySQLdb/release.py -> build/lib.macosx-10.3-fat-2.6/MySQLdb
running build_ext
building '_mysql' extension
gcc-4.0 -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3 -Dversion_info=(1,2,3,'gamma',1) -D__version__=1.2.3c1 **-I/Applications/MAMP/Library/include/mysql** -I/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c _mysql.c -o build/temp.macosx-10.3-fat-2.6/_mysql.o
_mysql.c:36:23: error: my_config.h: No such file or directory
_mysql.c:36:23: error: my_config.h: No such file or directory
_mysql.c:38:19: error: mysql.h: No such file or directory
_mysql.c:38:19:_mysql.c:39:26: error: mysqld_error.h: No such file or directory
 error: _mysql.c:40:20:mysql.h: No such file or directory
A: 

This path probably comes from mysql_config utility, edit your setup_posix.py and change the variable mysql_config.path to meet your correct mysql_config utility path.

Tarantula
A: 

The above suggestion is really helpful but it might also be worth mentioning that you must have mysql-devel installed as well for your build to be successful here.

jtrick