在windows上为django开发设置virtualenv,

sjh*_*sjh 4 python mysql windows django virtualenv

当我尝试使用安装MySQL-python时,第一次设置virtualenv

pip -E <<some virtual env>> install MySQL-python
Run Code Online (Sandbox Code Playgroud)

我明白了

File "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
Run Code Online (Sandbox Code Playgroud)

我想virtualenv阻止python以某种方式访问​​windows注册表,我已经尝试在virtualenv中运行easy_install而没有运气(我假设这完全相同),从我的主python安装复制网站包dir意味着蛋黄会看不到,

有谁知道我怎么能把这个哄骗到工作,或复制mysql支持所需的文件?

谢谢,

sjh*_*sjh 5

与setup.py在同一个目录中的site.cfg正在寻找错误的regsitry密钥,在文件末尾是

# The Windows registry key for MySQL.
# This has to be set for Windows builds to work.
# Only change this if you have a different version.
registry_key = SOFTWARE\MySQL AB\MySQL Server 5.0
Run Code Online (Sandbox Code Playgroud)

我浸入注册表,找到HKEY_LOCAL_MACHINE\SOFTWARE\MySQL AB \,看到我有5.1,

现在报告另一个错误,但这个问题至少解决了;)