MySQL and Python setup errors

Posted on
Sat Feb 16, 2008 1:09 am
turbow offline
Posts: 34
Joined: Oct 29, 2007

MySQL and Python setup errors

I've never dealt with MySQL or python, but thought I would give the new beta features a try. I've followed as per the instructions, however when I get to the python setup.py install I get the following error.

power-mac-g5:/MySQL-python-1.2.2 shane$ python setup.py install
sh: line 1: mysql_config: command not found
Traceback (most recent call last):
File "setup.py", line 16, in ?
metadata, options = get_config()
File "/MySQL-python-1.2.2/setup_posix.py", line 43, in get_config
libs = mysql_config("libs_r")
File "/MySQL-python-1.2.2/setup_posix.py", line 24, in mysql_config
raise EnvironmentError, "%s not found" % mysql_config.path
EnvironmentError: mysql_config not found
power-mac-g5:/MySQL-python-1.2.2 shane$

What did I miss?

Posted on
Sat Feb 16, 2008 9:22 am
matt (support) offline
Site Admin
User avatar
Posts: 21426
Joined: Jan 27, 2003
Location: Texas

Re: MySQL and Python setup errors

If you just enter this from the Terminal:
Code: Select all
mysql_config

What happens? If you get an error, then it sounds like MySQL didn't install completely or the wrong version of MySQL was installed.

Regards,
Matt

Posted on
Sat Feb 16, 2008 10:17 am
turbow offline
Posts: 34
Joined: Oct 29, 2007

(No subject)

I get "~bash: mysql_config: command not fount".

However, when I go to the MySQL preferences in the OS X preference pane it show the MySQL Server Instance is running.

I installed mysql 5.0.51a

Thanks,
Shane

Posted on
Sat Feb 16, 2008 10:20 am
matt (support) offline
Site Admin
User avatar
Posts: 21426
Joined: Jan 27, 2003
Location: Texas

(No subject)

It sounds like it wasn't completely installed or something. That file on my system is here:
Code: Select all
/usr/local/mysql/bin/mysql_config

If you have that file there, then it sounds like your path variable isn't setup correctly.

Matt

Posted on
Sat Feb 16, 2008 10:22 am
turbow offline
Posts: 34
Joined: Oct 29, 2007

(No subject)

That file is in the right location.

How do I set the path variable?

I'm a terminal newbie, last type I had to type commands was MS-DOS.

Posted on
Sat Feb 16, 2008 10:29 am
matt (support) offline
Site Admin
User avatar
Posts: 21426
Joined: Jan 27, 2003
Location: Texas

(No subject)

turbow wrote:
That file is in the right location.

How do I set the path variable?

I'm a terminal newbie, last type I had to type commands was MS-DOS.

Try adding this line to your ~/.bash_profile file:
Code: Select all
PATH=$PATH':/usr/local/mysql/bin'

You'll then need to close any open Terminal windows and try the mysql_config command again.

Matt

Posted on
Sat Feb 16, 2008 10:50 am
turbow offline
Posts: 34
Joined: Oct 29, 2007

(No subject)

That did a lot more when I ran python setup.py build...however it still ended with an error

I've tried to past the terminal items and error, however when I hit preview or submit this website says I do not have access.

In a nutshell it tries to execute gcc and has a long line of items, then says that "No such file or directory" and exits

Posted on
Sat Feb 16, 2008 10:59 am
matt (support) offline
Site Admin
User avatar
Posts: 21426
Joined: Jan 27, 2003
Location: Texas

(No subject)

turbow wrote:
In a nutshell it tries to execute gcc and has a long line of items, then says that "No such file or directory" and exits

Oh, I didn't even think of that. GCC is installed as part of the OS X developer tools installation. For GCC to be installed, you'll need to run the OS X developer tools installer.

Posted on
Sat Feb 16, 2008 11:13 am
turbow offline
Posts: 34
Joined: Oct 29, 2007

(No subject)

Okay. I'm downloading Xcode and will try again.

By the way, I went from Beta 13 to Beta 16, and you've helped me with my power failure trigger before that emails when the app initializes.

I've notice with b16 when I either restart the computer or shutdown Indigo I get the power restored email after the client has disappeared and shutdown. Nothing is logged that I can see. Not a big deal, but wanted to let you know.

Posted on
Sat Feb 16, 2008 2:41 pm
turbow offline
Posts: 34
Joined: Oct 29, 2007

(No subject)

Loading Xcode did it. Thanks for the help

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests