I get the following error when I try to install MySQL-python within virtualenv on a MAC running 10.8.
vertualenv EnvironmentError: mysql_config not found
It's a simple fix just 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
That's it, just make sure you match your paths to your own configuration. Now MySQL-python installs under virtualenv as normal.
Link: http://glynjackson.org/weblog/entry/fix-vertualenv-environmenterror-mysql_config-not-found.html
Also it can help you, especially if you use 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's ok)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With