本文介绍了Django错误:vertualenv EnvironmentError:找不到mysql_config的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我尝试在运行10.8的MAC上的virtualenv中安装MySQL-python时,我收到以下错误。 vertualenv EnvironmentError :mysql_config not found
解决方案
这是一个简单的修复,只是为了编辑来自virtualenv目录的/ bin / activate文件,并添加以下行
_OLD_VIRTUAL_PATH =$ PATH
pre>
PATH =$ VIRTUAL_ENV / bin:$ PATH
PATH =$ PATH:/ usr / local / mysql / bin /
export PATH
就是这样,只需确保您的路径与您自己的配置相匹配。现在MySQL-python正常安装在virtualenv下。
链接:
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
这篇关于Django错误:vertualenv EnvironmentError:找不到mysql_config的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!