python - 在 Windows 7 机器上安装 MySQL-python 时出错

标签 python windows 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 安装,但错误仍然存​​在(有点不同,tho):

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 安装.

我一直被困在那里,做了那个等等。

关于python - 在 Windows 7 机器上安装 MySQL-python 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8617720/

相关文章:

python - 使用 MySQLdb 检查错误

php - 使用 python 和 mysqldb 选择一行中的列并保存为变量

python - 使用 feedparser、MySQldb 和 python 将 rss feed 图像插入 mysql 数据库

python - 如何从值 models.IntegerChoices 中获取标签

windows - 从 excel 文件读取时 CPU 使用率达到 100%?

Python-将列表中隐藏的字典转换为DataFrame

c - 如何从内部驱动程序代码中读取注册表?

c# - 获取蓝牙端口名称

python3多进程共享numpy数组(只读)

python - NLTK 单词标记除带有破折号的单词外的所有单词,例如 ('hi-there' , 'me-you' )