On Unix-like systems such as Linux distributions, Solaris, Mac OS
X, and FreeBSD, you can download Connector/Python as a
tar archive from
To install Connector/Python from the
file, download the latest version and follow these steps:
tar xf mysql-connector-python-1.0.10.tarshell>
sudo python setup.py install
On Unix-like systems, Connector/Python is installed in the default
prefix is the location where
Python was installed and
X.Y is the
Python version. See
installation works in the Python manual.
If you are not sure where Connector/Python was installed, do the following to determine the location:
python>>> from distutils.sysconfig import get_python_lib >>> print get_python_lib() # Python v2.x /Library/Python/2.7/site-packages >>> print(get_python_lib()) # Python v3.x /Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages
The preceding example shows the default installation location on Mac OS X 10.7.