2012-02-25 3 views
0

Так что я пытаюсь настроить MySQL с помощью python. Я бегуexport MYSQL_CONFIG не работает с easy_install

sudo easy_install mysql-python 

Все идет хорошо, пока я не попал этот блокпост:

Searching for mysql-python 
Reading http://pypi.python.org/simple/mysql-python/ 
Reading http://sourceforge.net/projects/mysql-python/ 
Reading http://sourceforge.net/projects/mysql-python 
Best match: MySQL-python 1.2.3 
Downloading http://download.sourceforge.net/sourceforge/mysql-python/MySQL-python-1.2.3.tar.gz 
Processing MySQL-python-1.2.3.tar.gz 
Running MySQL-python-1.2.3/setup.py -q bdist_egg --dist-dir /tmp/easy_install-n6N62W/MySQL-python-1.2.3/egg-dist-tmp-PnGsWS 
sh: mysql_config: command not found 
Traceback (most recent call last): 
    File "/Library/Frameworks/Python.framework/Versions/2.7/bin/easy_install", line 8, in <module> 
    load_entry_point('setuptools==0.6c11', 'console_scripts', 'easy_install')() 
    File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 1712, in main 
    File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 1700, in with_ei_usage 
    File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 1716, in <lambda> 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 152, in setup 
    dist.run_commands() 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands 
    self.run_command(cmd) 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command 
    cmd_obj.run() 
    File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 211, in run 
    File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 446, in easy_install 
    File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 476, in install_item 
    File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 655, in install_eggs 
    File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 930, in build_and_install 
    File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py", line 919, in run_setup 
    File "build/bdist.linux-i686/egg/setuptools/sandbox.py", line 62, in run_setup 
    File "build/bdist.linux-i686/egg/setuptools/sandbox.py", line 105, in run 
    File "build/bdist.linux-i686/egg/setuptools/sandbox.py", line 64, in <lambda> 
    File "setup.py", line 15, in <module> 
    metadata, options = get_config() 
    File "/tmp/easy_install-n6N62W/MySQL-python-1.2.3/setup_posix.py", line 43, in get_config 
    File "/tmp/easy_install-n6N62W/MySQL-python-1.2.3/setup_posix.py", line 24, in mysql_config 
EnvironmentError: mysql_config not found 

Однако, я сделал

export MYSQL_CONFIG=/usr/local/mysql/bin/mysql_config 

и это, кажется, есть, когда я делаю printenv , Что случилось с этой ошибкой, и как я могу ее исправить?

ответ