MySQL-python package issue

Can't seem to get this package to install.  Says it can't find mysql_config which(non pun intended) is located in my /usr/local/bin directory.   Even put a sym link into /usr/bin still doesn't work. I can pip install it perfectly fine from the terminal into a new virtualenv.

All my paths look find.  "/etc/path" has "/usr/local/bin".  

Here's the output of which:
(venv)Todds-MacBook-Pro:bin toddlehr$ which mysql_config

Permissions/ownership looks fine
(venv)Todds-MacBook-Pro:bin toddlehr$ ls -al /usr/local/bin/mysql_config
lrwxr-xr-x  1 toddlehr  admin  40 Jul 24 11:33 /usr/local/bin/mysql_config -> ../Cellar/mysql/5.5.25a/bin/mysql_config

Running OSX LION if that makes a difference, only couple weeks old with minimal stuff installed.

Here's the error i get: install –build-dir /private/var/folders/83/d30shwjj397cbkg2f6rxzml00000gn/T/pycharm-packaging3699838868753098904.tmp MySQL-python==1.2.3

Downloading/unpacking MySQL-python==1.2.3
  Running egg_info for package MySQL-python
    sh: mysql_config: command not found
    Traceback (most recent call last):
      File "<string>", line 14, in <module>
      File "/private/var/folders/83/d30shwjj397cbkg2f6rxzml00000gn/T/pycharm-packaging3699838868753098904.tmp/MySQL-python/", line 15, in <module>
        metadata, options = get_config()
    metadata, options = get_config()
      File "", line 43, in get_config
        libs = mysql_config("libs_r")
      File "", line 24, in mysql_config
        raise EnvironmentError("%s not found" % (mysql_config.path,))
    EnvironmentError: mysql_config not found
    Complete output from command python egg_info:
    sh: mysql_config: command not found

Comment actions Permalink
If you don't start PyCharm from a console, it won't see the paths defined in your /etc/paths. Here's how to define them in a way visible to all applications:
Comment actions Permalink
Awesome that worked.  Added the following to my /etc/launchd.conf

setenv PATH /usr/local/bin:/usr/bin
Comment actions Permalink
On same subject if you get a chmod error when you install pycrypto package, you'll need to add /bin to your /etc/launchd.conf.

Please sign in to leave a comment.