I'm currently trying to build and install the mySQLdb module for Python, but the command
python setup.py build
gives me the following error
running build
running build_py
copying MySQLdb/release.py -> build/lib.macosx-10.3-intel-2.7/MySQLdb
error: could not delete 'build/lib.macosx-10.3-intel-2.7/MySQLdb/release.py': Permission denied
I verified that I'm a root user and when trying to execute the script using sudo, I then get a gcc-4.0 error:
running build
running build_py
copying MySQLdb/release.py -> build/lib.macosx-10.3-fat-2.7/MySQLdb
running build_ext
building '_mysql' extension
gcc-4.0 -fno-strict-aliasing -fno-common -dynamic -g -O2 -DNDEBUG -g -O3 -Dversion_info=(1,2,3,'final',0) -D__version__=1.2.3 -I/usr/local/mysql/include -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.3-fat-2.7/_mysql.o -Os -g -fno-common -fno-strict-aliasing -arch x86_64
unable to execute gcc-4.0: No such file or directory
error: command 'gcc-4.0' failed with exit status 1
Which is odd, because I'm using XCode 4 with Python 2.7. I've tried the easy_install and pip methods, both of which dont work and give me a permission denied error on release.py. I've chmodded that file to see if that was the problem but no luck. Thoughts?