MySQL-Python install - Could not build the egg

IdeoREX picture IdeoREX · Jul 13, 2013 · Viewed 14.6k times · Source

I'm trying to setup python mysql. I'm working through the following tutorial:

http://anthonyscherba.com/site/blog/django-mysql-install-mac

I'm all good until set 5. When I run

$ python setup.py clean

and I get in return

 /Users/msmith/Downloads/MySQL-python-1.2.4b4/distribute-0.6.28-py2.7.egg
 Traceback (most recent call last):
 File "setup.py", line 7, in <module>
    use_setuptools()
  File "/Users/msmith/Downloads/MySQL-python-1.2.4b4/distribute_setup.py", line 145, in use_setuptools
    return _do_download(version, download_base, to_dir, download_delay)
  File "/Users/msmith/Downloads/MySQL-python-1.2.4b4/distribute_setup.py", line 125, in _do_download
    _build_egg(egg, tarball, to_dir)
  File "/Users/msmith/Downloads/MySQL-python-1.2.4b4/distribute_setup.py", line 116, in _build_egg
    raise IOError('Could not build the egg.')
IOError: Could not build the egg.

Answer

Mark Shust at M.academy picture Mark Shust at M.academy · Jun 17, 2014

Nothing helped for me. I had to update MySQL-python to 1.2.5, and that resolved the issue.

MySQL-python==1.2.5