Python is very famous programming language. MySQL is an open-source database management system and its also most famous database management system.In this tutorial you will learn how to install python MySQL connector in Linux and these are the most easy way.
Now open your terminal and types commands,you will find many commands about install python MySQL connector please try one by one you one command from these successful install python MySQL connector then don't need to try another.But if one command failed to install python MySQL connector
successful then try another.
1. sudo apt-get install python3-mysql.connector
2. First run this command
sudo apt-get install python3-pip
Then this
pip3 install mysql-connector
3. pip3 install mysql-connector-python --allow-external mysql-connector-python
4. apt-get install python-mysqldb
5. pip install --allow-all-external git+git://github.com/multiplay/mysql-connector-python
6. pip install mysql-connector-python==2.1.2 --allow-external mysql-connector-python
7.First run this command
apt-get install python-pip
Then
pip install -U pip
Then
apt-get install python-dev libmysqlclient-dev
Finally
pip install MySQL-python
8. sudo apt-get install build-essential python-dev libmysqlclient-dev
9. First run this command to create virtualenv:
virtualenv myvirtualenv
Then
source myvirtualenv/bin/activate
Then run this command to install build dependencies:
sudo apt-get build-dep python-mysqldb
Finally its time to install python-MySQL :D
pip install mysql-python
10. yum install mysql-devel
11. First run this command
sudo apt-get install libmysqlclient-dev
Then
sudo apt-get install python-mysql.connector
Then run this Command
sudo apt-get install python3-mysql.connector
If all of these commands are failed then you should download python MySQL connector for Linux and install manually.
Download
Now open your terminal and types commands,you will find many commands about install python MySQL connector please try one by one you one command from these successful install python MySQL connector then don't need to try another.But if one command failed to install python MySQL connector
successful then try another.
1. sudo apt-get install python3-mysql.connector
2. First run this command
sudo apt-get install python3-pip
Then this
pip3 install mysql-connector
3. pip3 install mysql-connector-python --allow-external mysql-connector-python
4. apt-get install python-mysqldb
5. pip install --allow-all-external git+git://github.com/multiplay/mysql-connector-python
6. pip install mysql-connector-python==2.1.2 --allow-external mysql-connector-python
7.First run this command
apt-get install python-pip
Then
pip install -U pip
Then
apt-get install python-dev libmysqlclient-dev
Finally
pip install MySQL-python
8. sudo apt-get install build-essential python-dev libmysqlclient-dev
9. First run this command to create virtualenv:
virtualenv myvirtualenv
Then
source myvirtualenv/bin/activate
Then run this command to install build dependencies:
sudo apt-get build-dep python-mysqldb
Finally its time to install python-MySQL :D
pip install mysql-python
10. yum install mysql-devel
11. First run this command
sudo apt-get install libmysqlclient-dev
Then
sudo apt-get install python-mysql.connector
Then run this Command
sudo apt-get install python3-mysql.connector
If all of these commands are failed then you should download python MySQL connector for Linux and install manually.
Download
0 Comments