setting up virtualenv for django development on windows,
-
19-09-2019 - |
Question
Setting up a virtualenv for the first time, when i try to install MySQL-python using
pip -E <<some virtual env>> install MySQL-python
i get
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
I guess virtualenv is stopping python from accessising the windows registry somehow, i have tried running easy_install within the virtualenv with no luck (i assume this does exactly the same thing), copying over the site packages dir from my main python install means that yolk will not see it,
Does anyone know how i can either cajole this into working, or copy over the files needed for mysql support?
Thanks,
Solution
site.cfg in the same dir as setup.py was looking for the wrong regsitry key, at the end of the file is
# 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
I dipped into the registry and found HKEY_LOCAL_MACHINE\SOFTWARE\MySQL AB\ and saw i had 5.1 instead,
reporting another error now, but this question is solved at least ;)