MySQL Connector/Python Developer Guide  /  Connector/Python Installation  /  Verifying Your Connector/Python Installation

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.

The C Extension is installed as in the site-packages directory, not in the mysql/connector directory.

Depending on your platform, the installation path might differ from the default. 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

>>> print(get_python_lib())           # Python v3.x

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”.

Download this Manual
PDF (US Ltr) - 0.6Mb
PDF (A4) - 0.6Mb
EPUB - 130.2Kb
HTML Download (TGZ) - 77.7Kb
HTML Download (Zip) - 95.2Kb
User Comments
Sign Up Login You must be logged in to post a comment.