|
Spec-Zone .ru
спецификации, руководства, описания, API
|
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 .tar.gz file, download the latest version and
follow these steps:
shell>gunzip mysql-connector-python-1.0.10.tar.gzshell>tar xf mysql-connector-python-1.0.10.tarshell>cd mysql-connector-python-1.0.10shell>sudo python setup.py install
On Unix-like systems, Connector/Python is installed in the default location /,
where prefix/lib/pythonX.Y/site-packages/prefix is the location where Python was installed and X.Y is the Python version. See in the Python manual.
If you are not sure where Connector/Python was installed, do the following to determine the location:
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
The preceding example shows the default installation location on Mac OS X 10.7.