Install MySql in python2.6 on Windows

Source: Internet
Author: User

Changing a new computer to install various environments is a big problem. I did not write my own experiences, but I had a long eye.

I have installed mysql-python-1.2.2.win32-py2.6.exe after python2.6 ),

Then test, smooth error, solution please refer to the network, such as http://bask.javaeye.com/blog/550290

Write a special articleArticleBecause none of the methods provided above can solve my problems on the Internet, so I will keep them behind. If you also encounter such a general solution,

Try mine,

The difference is that

1. importerror: DLL load failed: the specified module cannot be found.
----------------------------------
D: \ Program Files \ python2.6> Python
Python 2.6.1 (r261: 67517, DEC 4 2008, 16:51:00) [MSC v.1500 32 bit (Intel)] on Win32
Type "help", "copyright", "credits" or "License" for more information.
>>> Import mysqldb
Traceback (most recent call last ):
File "<stdin>", line 1, in <module>
File "D: \ Program Files \ python2.6 \ Lib \ Site-packages \ mysqldb \__ init _. py", line 19, in <module>

 

>>> Import _ MySQL
Importerror: DLL load failed: the specified module cannot be found.
----------------------------------
Solution: Download The libmmd. dll (Attachment) and libguide40.dll (Attachment) DLL files and copy them to the Lib \ Site-packages directory of the python installation directory.
See: http://sourceforge.net/forum/message.php? Ms. g_id = 5613887

 

This is online,

I remember libmmd when I first installed Python + MySQL. DLL and libguide40.dll files, but they are not used at all. However, for a long time, I have forgotten how to solve them,

So I ran to LIB/Site-packages under the python directory of the original machine to check whether these two files exist, but there is a libmysql. DLL file, so I copied the file and successfully passed the test,

This file is packaged in the same way as the MySQL file.

 

The methods for replacing _ init _. py and converters. py are true. I hope they will be helpful to you (and I will install them again later.

 

Click here to download

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.