Bem vindo!

ao blog Willem Allan

Problema ao instalar MySQL-python no linux

Ao tentar instalar o mysql:

pip install MySQL-python

Aparece o seguinte erro:

sh: mysql_config: command not found
Traceback (most recent call last):
  File "setup.py", line 15, in <module>
    metadata, options = get_config()
  File "/usr/lib/python2.5/MySQL-python-1.2.3/setup_posix.py", line 43, in get_config
    libs = mysql_config("libs_r")
  File "/usr/lib/python2.5/MySQL-python-1.2.3/setup_posix.py", line 24, in mysql_config
    raise EnvironmentError("%s not found" % (mysql_config.path,))
EnvironmentError: mysql_config not found

Para resolver instale esta lib (distribuições baseadas no debian):

sudo apt-get install libmysqlclient-dev

Outro erro que pode ocorrer:

error: command 'gcc' failed with exit status 1

Para resolver este erro instale:

sudo apt-get install python-dev

abs