The fix is to use the ARCHFLAGS environment variable that distutils will pick up on to only build for your architecture: ARCHFLAGS=`arch` python setup. However, the MySQL you just installed is only for x86 so it borks. By default distutils (the library behind python setup.py build) tries to build binary Python extensions for all the same architectures.
![mac python install mysql mac python install mysql](https://techmirrors.org/wp-content/uploads/2020/09/1600708560_maxresdefault-1024x576.jpg)
In any case the problem here is that my Python install (ActivePython 2.6) is a universal build (including i386 and ppc). I suspect they may not have hit this because they were building against the system Python (in /usr/bin/python, /System/Library/Frameworks/amework/Versions/Current) which may have some tweaks to just handle this. I didn’t see this mentioned in others’ post on this. Ld: warning in /usr/local/mysql/lib/libmygcc.a, file is not of required architecture Ld: warning in /usr/local/mysql/lib/libmysqlclient_r.dylib, file is not of required architecture Ld: warning in build/temp.macosx-10.3-i386-2.6/_mysql.o, file is not of required architecture
MAC PYTHON INSTALL MYSQL FOR MAC OS
![mac python install mysql mac python install mysql](https://techmirrors.org/wp-content/uploads/2020/08/1597162756_maxresdefault.jpg)
![mac python install mysql mac python install mysql](https://pic1.zhimg.com/v2-aecfe88d3c29f13d695c0bc72b1566d5_r.jpg)