In Ubuntu and Python 3.5.2 I want to connect to a Mysql-Database.
With the command "import mysql.connector" I get an ImportError "No module named 'mysql'".
Checking the installation of mysql-connector I get with
pip search mysql-connector | grep --color mysql-connector-python
What can be the reason of the error ?
Meanwhile I found the following solution:
sudo apt-get install python3-mysql.connector
With the command "import mysql.connector" I get an ImportError "No module named 'mysql'".
Checking the installation of mysql-connector I get with
pip search mysql-connector | grep --color mysql-connector-python
Quote:mysql-connector-python (8.0.19) - MySQL driver written in Python
mysql-connector-python-dd (2.0.2) - MySQL driver written in Python
mysql-connector-python-rf (2.2.2) - MySQL driver written in Python
What can be the reason of the error ?
Meanwhile I found the following solution:
sudo apt-get install python3-mysql.connector