Bishnu Bhattarai
Bishnu Bhattarai

Reputation: 2910

Installation of MySQLdb in python

I have installed 3.3.0 python installer in windows. Then I want to install MySQLdb. I search the installation file for python 3.3.0, I got "MySQL-python-1.2.4b4.win32-py2.7" and installed it. But it shows that 'python version 2.7 required, which is not found in your registry'. I also got the solution in stackoverflow about this problem but my problem was not solved. What I have tried is explained below :

1. First I have exported python from registry HKEY_LOCAL_MACHINE-> Software.
2. I have saved the file in desktop.
3. I open it with notepad++.
4. Then I replaced all the LOCAL_MACHINE with CURRENT_USER and save it.
5. Finally  I executed the saved file in desktop.

But nothing happened, my problem is not solved and as it is as it before was. Is there any solution for it ?

Upvotes: 6

Views: 2632

Answers (1)

Lie Ryan
Lie Ryan

Reputation: 64827

Python libraries that uses compiled C extensions must be compiled against the exact version of Python. The MySQLdb package you downloaded is for python 2.7 and wouldn't work on python 3.3.

As far as I can tell, the MySQLdb does not support Python 3 yet and there's no plan to port it to Python 3

All hope is not lose, however. There are other MySQL wrappers, see MySQL-db lib for Python 3.x?

Upvotes: 2

Related Questions