1

I am trying to install the python module mysqldb which is the python interface for mysql. I need this module because I am creating a Django development server (Django 1.4, OpenSUSE) and the database package I wish to use is mysql. This is the tutorial I am following: https://docs.djangoproject.com/en/1.4/ref/databases/#mysql-notes

I am using virtualenv, and inside my virtual environment I am executing this command:

$ pip install mysql-python

My first error was that the 'mysql_config' command was not found. After some reading I went into yast to install 'libmysqlclient-devel' which is defined as 'MariaDB development header files and libraries'. I do not have MariaDB installed, just mysql. I don't know if this will make a difference. After installing that, I type the same command and now have this error:

$ pip install mysql-python

unable to execute gcc: No such file or directory

error: command 'gcc' failed with exit status 1

I have no idea what this is. Before I came here I read some things about python-dev tools but I can't find any package for that in yast or any modules in pip search. Anyone know what this error means?

1 Answer 1

0

Your system is probably missing the gcc package. To install on OpenSUSE you can either use YAST or Zypper. From a shell:

% sudo zypper install gcc

-or-

% sudo zypper in gcc

You may need additional packages to just the compiler as well. Here's a link to zypper's users guide. You may be able to get away with doing a zypper install gcc* as well. Not sure how many other packages fall under gcc* though.

Also depending on the application you're trying to build you may need g++, zyper install gcc-g++.

1
  • Thank you. I needed the gcc, make, and python-devel packages. Much appreciated!
    – smilebomb
    Apr 24, 2013 at 14:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .