在Windows 7机器上安装MySQL-python时出错
作者:互联网
我正在尝试在Windows计算机上安装django(我发誓,这不是我的错).
当涉及到mysqldb模块时,我不断收到此错误:
Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. All rights reserved.
PS C:\Users\ME> easy_install MySQL-python
Searching for MySQL-python
Reading http://pypi.python.org/simple/MySQL-python/
Reading http://sourceforge.net/projects/mysql-python/
Reading http://sourceforge.net/projects/mysql-python
Best match: MySQL-python 1.2.3
Downloading http://download.sourceforge.net/sourceforge/mysql-python/MySQL-python-1.2.3.tar.gz
Processing MySQL-python-1.2.3.tar.gz
Running MySQL-python-1.2.3\setup.py -q bdist_egg --dist-dir c:\users\ME\appdata\local\temp\easy_install-bl367m\MySQL-python-1.2.3\egg-dist-tmp-wgpnqn
error: The system cannot find the file specified
有什么问题?我也尝试下载源代码并通过python setup.py安装,但是错误仍然存在(有点不同,所以):
Traceback (most recent call last):
File ".\setup.py", line 15, in <module>
metadata, options = get_config()
File "C:\Users\samuele.mattiuzzo\Downloads\Django_python_apps\MySQL-python-1.2.3\setup_windows.py", line 7, in get_config
serverKey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, options['registry_key'])
WindowsError: [Error 2] The system cannot find the file specified
提前谢谢大家!
解决方法:
从here的exe安装.
我一直被困在那里,那样做.
标签:mysql-python,windows,python 来源: https://codeday.me/bug/20191101/1987001.html