I just want to be able to do a simple SELECT * FROM
query.
I found a Python MySQLdb
Package, but can't get it to install using the Windows installer. It says,
Python is not found in the registry
I then tried briefly to compile it myself but I've debugged about six errors so far during the compile process and have given up.
If you are able to connect to MySQL using Anaconda, could you please detail out how you did it? Thanks.
The problem is that the binary installers for Python packages are looking for a specific registry key, which does not exist if you are using the Anaconda installer.
To make matters worse, Anaconda doesn't provide database drivers in either their commercial or free repository.
So now you have two options
Recommended - get rid of Anaconda. Uninstall it. Install Python using the official Python installer for Windows. At this time, I would recommend the 2.7.x series for maximum compatibility. To make your vanilla installation the same as Anaconda, you can install the packages that are bundled with Anaconda separately.
The Laboratory for Fluorescence Dynamics at the University of California, Irvine maintains a repository of Python packages that are difficult to install on Windows. They have taken these packages and converted them into Windows installer binaries. So, simply download and double click to install. Just like the MySQL installer, these will also only work with the official Python installer; for the same reason.
The main packages you are probably after, you can start by installing the following:
setuptools
ipython
numpy
scipy
pandas
matplotlib
requires:
dateutil
pytz
pyparsing
six
Pillow
pycairo
tornado
certifi
backports
wx-python
pyside
pyqt
Numba
llvm
blaze
bokeh
It will take some time to download these, but they are all Windows installers so you just have to double click your way through them. Keep in mind the pre-requisites (indented entries above).
The other option is to trick the MySQL installer (and other Windows installers) into thinking the Anaconda installation is the official Python installation. You can do that by modifying the registry.
For Windows 7 64, create a file with the following:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\2.7\InstallPath]
@="D:\\Python27\\"
Replace "D:\\Python27\\"
with the path to your Anaconda installation. Save the above file with a .reg
extension, then double click it to affect the changes to your registry. To do this might require administrator level access so the above might not work for your system.
I would highly recommend option #1 because it will ensure your system is setup to be most compatible with other Python libraries.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With