Python windows mysqldb installation error Solution

Source: Internet
Author: User

First, the following error occurs:
Serverkey = _ winreg. openkey (_ winreg. HKEY_LOCAL_MACHINE, options ['registry _ key']) windowserror: [Error 2]

Solution:

Open the MySQL-python-1.2.3/site. cfg file and change 5.0 of the last line to 5.1, as shown below:
Registry_key = software/MySQL AB/MySQL Server 5.1

 

Re-create Python setup. py build
Error 2:
Build/temp. win32-2.6/release/_ mysql. PYD. manifest
: General error c1010070: failed to load and parse the manifest.
System cannot find the file specified.
Error: Command 'mt.exe 'failed with exit status 31

Solution:
Open C:/python26/lib/distutils/msvc9compiler. py
Find this line ld_args.append ('/manifestfile:' + temp_manifest)
Then add a line ld_args.append ('/manifest') below ')

 

Python setup. py build succeeded.
Last executed
Python setup. py install

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.