Django error: vertualenv EnvironmentError: mysql_config not found

I get the following error when I try to install MySQL-python in virtualenv on a MAC running 10.8.

vertualenv EnvironmentError: mysql_config not found 
+8
django
source share
2 answers

This is a simple fix to edit the / bin / activate file from the virtualenv directory and add the following lines,

 _OLD_VIRTUAL_PATH="$PATH" PATH="$VIRTUAL_ENV/bin:$PATH" PATH="$PATH:/usr/local/mysql/bin/" export PATH 

To do this, just make sure that you map your paths with your own configuration. Now MySQL-python is installed under virtualenv as usual.

Link: http://glynjackson.org/weblog/entry/fix-vertualenv-environmenterror-mysql_config-not-found.html

+16
source share

It can also help you, especially if you are using MacOS X

 pip install MySQL-python (error) echo "mysql_config = /usr/local/mysql/bin/mysql_config" >> ~/.virtualenvs/ENV_NAME/build/MySQL-python/site.cfg pip install MySQL-python (it ok) 
+6
source share

All Articles