In Windows7 64-bit installation Mysql-python-1.2.5.win32-py2.7.exe

Source: Internet
Author: User


With Python you can operate MySQL, so you want to install Mysql-python under Windows.


1,python need to install 32-bit.
Software name, Python-2.7.13.msi
Double-click to install
Add Python root to environment variables after installation is complete.

2, install Mysql-python-1.2.5.win32-py2.7.exe
Error when installing Mysql-python-1.2.5.win32-py2.7.exe.
To solve this problem, you can use the following methods:

Create a new register.py file on the D drive, as follows:

#   # script to register python 2.0 or later for  Use with win32all   # and other extensions that require  Python registry settings   #   # written by  joakim loew for secret labs ab / pythonware   #    # source:   # http://www.pythonware.com/products/works/articles/regpy20.htm    #   # modified by Valentine Gogichashvili as  described in http://www.mail-archive.com/[email protected]/msg10512.html       import sys     from _winreg import *      # tweak as necessary   version = sys.version[ :3]  installpath = sys.prefix     regpath =  "Software\\python\\pythoncore\\%s\\"  %  ( Version)   installkey =  "InstallPath"   pythonkey =  "PythonPath"    pythonpath =  "%s;%s\\lib\\;%s\\dlls\\"  %  (       installpath, installpath, installpath  )      def registerpy ( ):       try:          reg  = openkey (Hkey_current_user, regpath)       except  environmenterror as e:          try:               reg = createkey (HKEY_CURRENT _user, regpath)                SetValue (reg, installkey, reg_Sz, installpath)                SetValue (Reg, pythonkey, reg_sz, pythonpath)                closekey (REG)            except:              print  "* * *  unable to register! "               return           print  "--- python", version,  "is now  registered! "           return      if  (QueryValue (Reg, installkey)  == installpath and           queryvalue (Reg, pythonkey)  == pythonpath):   &NBsp;       closekey (REG)            print  "=== python", version,  "is already registered!"           return      closekey (reg)       print  "*** unable to register!"       print  "*** you probably have another python  installation! "      if __name__ ==  "__main__":       Registerpy ()

Then run the Python file with the following effect:

D:\>python register.py---Python 2.7 is now registered! D:\>

Reinstalling the Mysql-python-1.2.5.win32-py2.7.exe will be no problem.

4, some download links
python2.7.13 https://www.python.org/downloads/release/python-2713/to download the 32-bit
mysql-python-1.2.5.win32-py2.7.exe https://pypi.python.org/pypi/MySQL-python/1.2.5 to download the 32-bit


I have downloaded it well, including Mysql-python-1.2.5.win32-py2.7.exe, Python-2.7.13.msi and register.py.

Download Link: http://down.51cto.com/data/2278526

Install Mysql-python-1.2.5.win32-py2.7.exe in Windows7 64-bit

Related Article

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.