1

*My larger problem is that I cannot launch a web application using dev_apperver.py from my command line*

However, I also cannot install MySQLdb as well.

Joes-MacBook-Pro:MySQL-python-1.2.3 MoeJancini$ python setup.py build  
sh: mysql_config: command not found
Traceback (most recent call last):
File "setup.py", line 15, in <module>
    metadata, options = get_config()
File "/Users/MoeJancini/Desktop/MySQL-python-1.2.3/setup_posix.py", line 43, in      get_config
libs = mysql_config("libs_r")
File "/Users/MoeJancini/Desktop/MySQL-python-1.2.3/setup_posix.py", line 24, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
EnvironmentError: mysql_config not found
Joes-MacBook-Pro:MySQL-python-1.2.3 MoeJancini$

I have looked at similar questions an navigated other forums but I still cannot get past the setup.py build command. Explicit instructions on how to get MySQLdb working would be useful since I'm a noob. Thank you

Moe Jan
  • 369
  • 1
  • 4
  • 16
  • Have you installed MySQL itself first? `mysql_config not found` suggests setup.py is not finding your `MySQL` installation. – unutbu Sep 20 '12 at 19:48

1 Answers1

1

It depends on what your source for MySQL is. If you're using MacPorts, you may find that you have to use mysql_config5in order for it to work. Edit site.cfg so that it has the right path. Then again, if you're using MacPorts, you should just sudo port install py-mysql and that will install it for you.

So if you're not using MacPorts, you're probably using the mysql.com packages. In that case, you need to install their Connector/C package, which includes development headers and libraries and mysql_config.

farcepest
  • 145
  • 6