easy_install EnvironmentError: mysql_config not found

When attempting to run 'easy_install MySQL-python' I get the following error message:

EnvironmentError: mysql_config not found

How do I install the python mysql libraries using easy_install?

What would cause this error?

asked 13 Jul '11, 19:25

fox's gravatar image

fox ♦♦
800162527
accept rate: 37%

edited 13 Jul '11, 19:26


Ubuntu or Debian

sudo apt-get install libmysqlclient16 libmysqlclient16-dev python-dev

link

answered 13 Jul '11, 19:35

LostHero's gravatar image

LostHero
89091320
accept rate: 61%

edited 13 Jul '11, 19:41

I did that and now I'm getting the following error ...

Searching for MySQL-python

Reading http://www.pylonshq.com/download/

Reading http://pypi.python.org/simple/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-bM3FNF/MySQL-python- 1.2.3/egg-dist-tmp-y4kUGV

warning: no files found matching 'MANIFEST'

warning: no files found matching 'ChangeLog'

warning: no files found matching 'GPL'

In file included from _mysql.c:29:0:

pymemcompat.h:10:20: fatal error: Python.h: No such file or directory

compilation terminated.

error: Setup script exited with error: command 'gcc' failed with exit status 1

link

answered 13 Jul '11, 19:37

fox's gravatar image

fox ♦♦
800162527
accept rate: 37%

pymemcompat.h:10:20: fatal error: Python.h: No such file or directory

ubuntu or debian

apt-get install python-dev

link

answered 13 Jul '11, 19:40

LostHero's gravatar image

LostHero
89091320
accept rate: 61%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×7
×5
×2
×1

Asked: 13 Jul '11, 19:25

Seen: 5,526 times

Last updated: 13 Jul '11, 19:41

powered by OSQA