环境:
Windows 10
Python 2.7
需要安装mysql-python相关模块
C:\Python27\Scripts>pip2 install MySQLdb
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won’t be maintained after that date. A future version of pip will drop support for Python 2.7.
Collecting MySQLdb
Could not find a version that satisfies the requirement MySQLdb (from versions: )
No matching distribution found for MySQLdb
发现并不是 MySQLdb,而是mysql .
于是 需要下载驱动:
64位: MySQL-python-1.2.3.win-amd64-py2.7.exe
32位: MySQL-python-1.2.5.win32-py2.7.exe
在安装时遇到以下问题:
安装MySQL-python-1.2.3.win-amd64-py2.7.exe,时提示:Python version 2.7 required, which was not found in the registry
这是在注册表不能识别python2.7,原因windows是64位,安装的python是32位
备注: MySQLdb for python (32/64位)下载;http://www.co