1

I am installing a custom app that needs MySQL, which I already had working so I am a bit confused on what's going on.

Anyways here is the error:

Error loading MySQLdb module: this is MySQLdb version (1, 2, 4, 'final', 1),
  but _mysql is version (1, 2, 3, 'final', 0

Tried

sudo pip uninstall MySQL-python

then

sudo pip install MySQL-python

which worked...

Successfully installed MySQL-python

still the same error

Error loading MySQLdb module: this is MySQLdb version (1, 2, 4, 'final', 1), 
  but _mysql is version (1, 2, 3, 'final', 0
Zanna
  • 70,465
Guardian
  • 113
  • 1
  • 1
  • 9
  • http://askubuntu.com/questions/5121/how-do-i-report-a-bug – Panther Nov 07 '13 at 17:20
  • Please provide more information about your system, eg. which version of Ubuntu are you using? Which python version? – ergysdo Nov 07 '13 at 17:23
  • using Ubuntu 13.04, I am unsure of what mysql is installed... what command do I run to check? – Guardian Nov 07 '13 at 17:30
  • Try mysql --version – Dan Nov 07 '13 at 20:03
  • mysql Ver 14.14 Distrib 5.5.34, for debian-linux-gnu (x86_64) using readline 6.2 – Guardian Nov 07 '13 at 20:36
  • 1
    The best way to add additional information to your question is by editing it, with the edit button. It is better visible that way, and comments are mainly for secondary, temporary purposes. Comments are removed under a variety of circumstances. Anything important to your question should be in the question itself. – guntbert Nov 08 '13 at 21:14

1 Answers1

0

It seems that apt-get and pip each installed their own version of the library.

Try removing system MySQL with sudo apt-get remove python-mysqldb, and you should have something like this:

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  python-mysqldb
0 upgraded, 0 newly installed, 1 to remove and 3 not upgraded.
After this operation, 196 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 109333 files and directories currently installed.)
Removing python-mysqldb (1.2.3-2ubuntu1) ...
Zanna
  • 70,465