Python not importing mysqldb

Marco Bizzarri marco.bizzarri at gmail.com
Sat Apr 25 12:35:35 EDT 2009


On Fri, Apr 24, 2009 at 10:04 PM, 83nini <83nini at gmail.com> wrote:
> hi guys,
>
> i've been sweating the whole day trying to make python work with mysql
> but in vain!
> i'm doing the following:
> 1. visiting http://sourceforge.net/projects/mysql-python
> 2. dowloading mysql-python-test-1.2.3c1
> 3. extracting the files to C:\Python26\Lib\site-packages
> 4. writing "import MySQLdb" in the python prompt
>
> getting
>
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
>  File "C:\Python26\lib\site-packages\MySQLdb\__init__.py", line 19,
> in <module>
>
>    import _mysql
> ImportError: No module named _mysql
>
> WHY YYYYYYYYYYYYYYYYYYYYYYYYYYYYY????????
> why does it have to be so complicated???? what am i doing wrong for
> god's sake?



Suggestion: install python2.5 for windows, and then download this one:

http://sourceforge.net/project/downloading.php?group_id=22307&filename=MySQL-python-1.2.2.win32-py2.5.exe&a=71602382

I'm sure you'll save yourself a lot of time.

Regards
Marco





-- 
Marco Bizzarri
http://notenotturne.blogspot.com/
http://iliveinpisa.blogspot.com/



More information about the Python-list mailing list