我在Windows环境下使用python 2.7运行它,而在下面运行会出错,运行pip install mysql-python for testproject也会给出类似的错误。我尝试从http://www.codegood.com/archives/4下载并运行安装程序,但它说需要python 2.6版,但在注册表中找不到。有些资源说缺少mysql_config文件,是不是这样呢?
C:\django\testproject\build\MySQL-python>setup.py build
Traceback (most recent call last):
File "C:\django\testproject\build\MySQL-python\setup.py", line 1
metadata, options = get_config()
File "C:\django\testproject\build\MySQL-python\setup_windows.py"
et_config
serverKey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, option
y'])
WindowsError: [Error 2] The system cannot find the file specified
答案 0 :(得分:2)
您可以在此处找到所需内容:http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python
它有一个Python 2.7的预编译版本
答案 1 :(得分:0)