title: GCC-4.2 error on Mac OSX Mountain Lion, unable to install mysql-python
body: <p>I'm having trouble building MySQLdb on Mac OSX Mountain Lion. After upgrading to OSX Mountain Lion from OSX Lion, I have downloaded and installed Xcode 4.4 also. Then, I went to Preference > Downloads of the Xcode and installed Command Line Tools.</p>
  
  <p>I've downloaded MySQL-python ver. 1.2.3 from <a href="http://sourceforge.net/projects/mysql-python/" rel="nofollow noreferrer">http://sourceforge.net/projects/mysql-python/</a></p>
  
  <p>When I run</p>
  
  <pre><code>python setup.py build
  </code></pre>
  
  <p>I get below message:</p>
  
  <pre><code>running build
  running build_py
  copying MySQLdb/release.py -&gt; build/lib.macosx-10.6-intel-2.7/MySQLdb
  running build_ext
  building '_mysql' extension
  gcc-4.2 -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.6-intel-2.7/_mysql.o -Os -g -fno-common -fno-strict-aliasing -arch x86_64
  unable to execute gcc-4.2: No such file or directory
  error: command 'gcc-4.2' failed with exit status 1
  </code></pre>
  
  <p>However, the gcc exists. When I run</p>
  
  <pre><code>gcc
  </code></pre>
  
  <p>I get</p>
  
  <pre><code>i686-apple-darwin11-llvm-gcc-4.2: no input files
  </code></pre>
  
  <p>Below is a similar question that I have found but its solution, which is exactly what I have done already, doesn't work for me.</p>
  
  <p><a href="https://stackoverflow.com/questions/11787012/how-to-install-mysqldb-on-mountain-lion">How to install MySQLdb on Mountain Lion</a></p>