MySQL Connector/Python available through the Python Package Index
Today we registered MySQL Connector/Python with the Python Package Index (PyPI). It makes installing your favorite connector even easier (provided you first install setuptools or pip):
shell> easy_install mysql-connector shell> pip install mysql-connector
Please report problems either using Launchpad or MySQL Bugs website.
Facebook
LinkedIn
Twitter
Even better is to use the pip installer: http://pypi.python.org/pypi/pip
$ pip install mysql-connector
(pip does the same job as setuptools, but without messing with the system Python install the way setuptools does)
@Nick Coghlan
Thanks for reminding me about pip! I’m so used to easy_install.. Updating my post.
Hi Geert, this is my first time with Python and thanks you I’ve found a practical way to install MySQL connector on Python but Im having difficulties, so if you can help me…
I have used pip to install the connector but when I try to install MySQLdb it gives me this error:
Traceback (most recent call last):
File “C:\Python27\downloads\MySQL-python-1.2.3\setup.py”, line 15, in
metadata, options = get_config()
File “C:\Python27\downloads\MySQL-python-1.2.3\setup_windows.py”, line 7, in g
et_config
serverKey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, options['registry_ke
y'])
WindowsError: [Error 2] The system cannot find the file specified
I’m using Windows x64 and I have created on regedit under Wow6432Node a Python node, the same created by the installer under SOFTWARE. I have added C:\Python27\Scripts on my PATH
Any idea?
Thanks in advance for any help.
@Daniel Gerep
1) MySQLdb is not MySQL Connector/Python. If you want to use Connector/Python, you are not using the command line posted in my blog.
2) I’m not Windows savvy enough to help you but it seems it can’t really find the file it wants.