So, what sort of configuration files should you remove to uninstall Python 2.7 completely? Taking into account most of the Mac owners use macOS Sierra today, the authors included the method to get rid of Python 2.7 on this operating system. Dec 21, 2015 - Now, keep in mind that Mac OSX (10.8) already comes with Python 2.7 pre-installed, so these instructions will only really be helpful if you need.
Table of Contents. Prerequisites before installing MySQL Connector Python. You need root or administrator privileges to perform the installation process. Python must be installed on your machine. Note: – MySQL Connector Python requires python to be in the system’s PATH. Installation fails if python cannot be located.
On Unix and Unix-like systems, python is normally located in a directory included in the default PATH setting. On Windows, If python doesn’t in the system’s PATH please manually add the directory containing python.exe yourself.
This article applies to Platform(s): 64-bit Windows, Windows 10, Windows 7, Windows 8, Windows Vista, Windows XP, Linux, Ubuntu Linux, Debian Linux, SUSE Linux, Red Hat Linux, Fedora, MacOs. Python version(s): Python 2 and 3 MySQL Version(s): Greater than 4.1 Different ways to install MySQL Connector Python There are multiple ways to install Oracle’s MySQL Connector Python on your machine. Following are the few ways. Install MySQL Connector Python using pip command. Install MySQL connector python via source code (via ZIP or TAR file).
Use Built Distribution A package created in the native packaging format intended for a given platform. Example, RPM packages for Linux or MSI installer for windows Python MySQL Connector Versions Please refer to the following table of MySQL connector python versions. You need to install a module which is compatible with your python version. Connector/Python Version MySQL Server Versions Supported Python Versions 8.0 (continuation of 2.2) 8.0, 5.7, 5.6, 5.5 3.6, 3.5, 3.4, 2.7 2.2 5.7, 5.6, 5.5 3.5, 3.4, 2.7 2.1 5.7, 5.6, 5.5 3.5, 3.4, 2.7, 2.6 2.0 5.7, 5.6, 5.5 3.5, 3.4, 2.7, 2.6 1.2 5.7, 5.6, 5.5 (5.1, 5.0, 4.1) 3.4, 3.3, 3.2, 3.1, 2.7, 2.6 Great!
Now I will show you all the three ways to install it, you can choose as per your need. Pip Command to install MySQL Connector python It is always easy and simple to install any module using pip in python. MySQL Connector Python is available on pypi.org so you can install using pip command. Using pip command you can install MySQL Connector python on any operating system platform including Windows, MacOs, Linux, and Unix and Ubuntu. Use the following pip command to install MySQL Connector python. Pip install mysql-connector-python If you are facing any problem while installing please mention the version of the module and then try to install again.
Refer to the above table to install the correct version. Pip install mysql-connector-python8.0.11 If you are facing pip install fails error with “connection error: SSL: CERTIFICATEVERIFYFAILED certificate verify failed (ssl.c:598)”. You can solve this error. You can ignore SSL errors by setting pypi.org and files.pythonhosted.org as trusted hosts.
Please try following pip command to install MySQL Connector Python. Python -m pip install -trusted-host pypi.org -trusted-host files.pythonhosted.org -trusted-host pypi.python.org mysql-connector-python Verifying MySQL Connector Python installation is completed using pip You should get the following messages after running pip command. Collecting mysql-connector-python. Downloading packages. Requirement already satisfied: setup tools in D:python python37-32 lib site-packages.
Installing collected packages: mysql-connector-python. Successfully installed mysql-connector-python-8.0.13 The best way to verify this by If you are unable to install using pip you can install using the following approaches. Download and Install MySQL Connector Python on Windows There are two ways to install MySQL Connector Python on windows. Install using Source Code Distribution ( Platform Independent and Architecture Independent ZIP Archive).
Install using Built Distribution i.e. MSI installer Install MySQL Connector Python on Windows using a Source Code Distribution:- Follow below instruction to download Platform Independent ZIP. Go to download MySQL connector python for windows. This will automatically open the latest version of MySQL Connector Python. If you want to use the older version which is compatible with your python version then select “ Looking for previous GA versions” option which you can find at the right side.
if you want to check which version of MySQL Connector Python is compatible for your python version refer the above table. I am downloading 2.1.7 because I am using Python 3.5. Select Platform independent from the drop-down list select MySQL connector python platform independent zip for windows Click on “download” button to download ZIP file on your machine. After clicking on download you get the below screen, Click on No Thanks, start the download option. Begin to download MySQL connector python zip file for windows Note: If you want to download the latest version i.e. 8.0.1 then select “Looking for the latest GA versions” option which you can find at the right side. After the download is complete please follow below steps to install: –.
Unpack or extract the Zip archive in the intended installation directory (for example, C: mysql-connector ) using 7Zip or another tool that can read.zip files. Start a console window and change the location to the folder where you unpacked the Zip archive: C: cd C: mysql-connector. Inside the MySQL Connector Python folder, perform the installation using this command: C: python setup.py install You should get the following screen after this command python MySQL connector python installation completed for windows Verifying MySQL Connector/Python installation on windows How we can verify MySQL connection python is installed and make sure that it is working correctly and you are able to connect to the MySQL database server without any issues. To verify the installation, you use the following steps:. On Windows, the default Connector Python installation location is C: Python.Version Lib sitepackages here Python.version is the Python version you used to install the connector. Type the following line and execute the program.
If it is executed successfully mean installation is completed successfully. Import mysql.connector. Also, you can check that MySQL Connector Python installation is working and able to connect to MySQL Server. Download and Install MySQL Connector Python on Linux There are two ways to install MySQL Connector Python on For Unix and Unix-like systems such as Linux, Solaris, macOS, and FreeBSD. Install using Source Code Distribution ( Platform Independent (Architecture Independent), TAR File).
You can Install using Built Distribution for Example RPM file Install MySQL Connector Python on Linux using Source Code Distribution Follow below instruction to download MySQL connector python Platform Independent TAR (tar.gz) file. Go to it will open the below screen. Download MySQL connector python for Linux. It will open the latest version of MySQL connector python. Choose Previous GA version from the right side if you want to install version other than 8.0.1. You can refer the above table to check which version is compatible with your python version. Select Platform independent TAR from the “Select Operating System” drop-down list I am downloading 2.1.7 because I am using Python 3.5 MySQL connector python platform independent tar for Linux Choose the TAR archive file and click on the download button.
You should get the following screen, click on start my download. MySQL connector python begin your download for Linux After the download is complete please follow below steps to install: –. untar the downloaded tar.gz file. Use below command to untar. Shelltar xzf mysql-connector-python-VERSION.tar.gz. Change to the directory where you extracted a tar file shell cd mysql-connector-python-VERSION. execute the following command to install MySQL connector python on Linux.
Shell sudo python setup.py install. To see all options and commands supported by setup.py use this command shell python setup.py -help Verifying MySQL Connector Python installation on Linux To verify the installation, you use the following steps:. On Unix-like systems, the default Connector/Python installation location is /prefix/python.VERSION/site-packages/ where prefix is the location where Python is installed and VERSION is the Python version. Type the following line and execute the program. If it is executed successfully mean installation is completed successfully. Import mysql.connector. Also, you can check that MySQL Connector Python installation is working and able to connect to MySQL Server.
Download and Install MySQL Connector Python on MacOs You can Installing MySQL Connector Python on macOS Using a Disk Image. Go to. Refer the above table to check which version is compatible with your python version. Download the mysql-connector-python-8.0.11-macos10.13.dmg file. It is architecture Independent DMG file.Install the downloaded MySQL Connector Python by opening it and double clicking the resulting.pkg file Verifying MySQL Connector Python installation on MacOs Check that MySQL Connector Python installation is working and able to connect to MySQL Server by Install MySQL Connector Python on Ubuntu Use the following command to install MySQL connector Python on Ubuntu sudo apt-get install mysql-connector-python After this run the following command pip install mysql-connector-python You can replace pip with pip3 if the command fails in Python3. If the above approach doesn’t work you can still install it on Ubuntu using the source code. Go to.
Select Operating system Ubuntu Linux from the drop-down. Select the OS version as an architecture independent. I am selecting Ubuntu-Linux 16.04 (architecture independent). You will get two entries fro DEB Package python for MySQL Connector Python (For python 2 and Python 3).
Install MySQL connector python on Ubuntu. Download the listed DEB package and install it using the following commands. First, unpack the DEB file and then install it. Sudo dpkg -i /pathtodownloadeddebfile After this run the following command. Sudo apt-get install -f. You are now done with installing MySQL Connector Python on Ubuntu. That’s it, folks Let me know your comments in the section below.