4.4 Verifying Your Connector/Python Installation

On Windows, the default Connector/Python installation location is C:\PythonX.Y\Lib\site-packages\, where X.Y is the Python version you used to install the connector.

On Unix-like systems, the default Connector/Python installation location is /prefix/pythonX.Y/site-packages/, where prefix is the location where Python is installed and X.Y is the Python version. See How installation works in the Python manual.

If you are not sure where Connector/Python is installed, do the following to determine its location (the output here shows installation locations as might be seen on OS X):

shell> 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

To test that your Connector/Python installation is working and able to connect to MySQL Server, you can run a very simple program where you supply the login credentials and host information required for the connection. For an example, see Section 5.1, “Connecting to MySQL Using Connector/Python”.