ImportError: No module named MySQLdb 安装MySQLdb, 注意是windows命令符下,不是python环境下
pip install MySQLdb
error: Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpython27
安装MySQLdb时,报错缺少Visual C++ 9.0。解决方法:下载并安装MySQL-python 1.2.5 . https://pypi.python.org/pypi/MySQL-python/1.2.5 注意: 64位系统的,请安装64位的,否则报错
安装MySQL-python时报错:Python version 2.7 required, which was not found in the registry 原因: 这是在注册表不能识别python2.7,原因windows是64位,安装的python是32位
解决方法:
1.在任意盘符文件夹新建一个register.py文件, 将如下代码拷贝进去:
#
# 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