virtualenv, mysql-python, pip: anyone know how?

rz. picture rz. · Oct 2, 2009 · Viewed 33.7k times · Source

I'm trying to install the mysql bindings in a virtualenv. I'd prefer to use pip or easy_install. pip gives me the following error:

  File "setup_posix.py", line 24, in mysql_config

    raise EnvironmentError("%s not found" % (mysql_config.path,))

EnvironmentError: mysql_config not found

easy_install either gets a 404 from sourceforge or gives me a very similar error.

Does anyone know how to get around this in a virtualenv?

Answer

ariddell picture ariddell · Dec 5, 2009

I'm also trying to setup MySQL bindings in a virtualenv. All I had to do was install the package that contains mysql_config. On Ubuntu it's called libmysqlclient-dev.

After that I was able to do a (virtualenv'd) python setup.py build and python setup.py install.