How to install MySql-python-1.2.3 on Mac OS 10.8

I downloaded http://sourceforge.net/projects/mysql-python/

as well as downloaded Xcode and command line tools.

When I used this command "sudo python setup.py build"

I see it:

running build running build_py copying MySQLdb/release.py -> build/lib.macosx-10.8-intel-2.7/MySQLdb running build_ext building '_mysql' extension clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict- aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes - Wshorten-64-to-32 -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe - Dversion_info=(1,2,4,'beta',4) -D__version__=1.2.4b4 - I/Applications/XAMPP/xamppfiles/include/mysql - I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.8-intel-2.7/_mysql.o -mmacosx-version-min=10.4 -arch i386 -arch ppc -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -DDONT_DECLARE_CXA_PURE_VIRTUAL clang: warning: not using the clang compiler for the 'powerpc' architecture _mysql.c:44:10: fatal error: 'my_config.h' file not found #include "my_config.h" ^ 1 error generated. error: command 'clang' failed with exit status 1 

How can I do now ???

0
source share
2 answers

The MySQL version of MAMP does not come with dev headers. You must either download, or install the official release of MySQL, or integrate the headers into MAMP according to: http://dreamconception.com/tech/how-to-install-mysqldb-mysql-python-on-mamp/

+2
source

You also need to install MySQL .

I suggest saving problems and taking a look at something like django bitnami stack . It contains MySQL and mysql-python all wrapped up with a simple one-click installation.

0
source

All Articles