Timotej Arnuš
Timotej Arnuš

Reputation: 145

mysql connector not found

I am using Python3, I have tried to install mysql.connector with this command

pip install mysql-connector-python-rf

but when I run the code I get ModuleNotFoundError: No module named 'mysql'

if I tipe in pip search mysql-connector-python it founds this versions:

mysql-connector-python (8.0.20)               - MySQL driver written in Python
  INSTALLED: 8.0.20 (latest)
mysql-connector (2.2.9)                       - MySQL driver written in Python
beam-mysql-connector (1.8.2)                  - MySQL I/O Connector of Apache Beam
mysql-connector-python-dd (2.0.2)             - MySQL driver written in Python
  INSTALLED: 2.0.2 (latest)
mysql-connector-python-rf (2.2.2)             - MySQL driver written in Python
  INSTALLED: 2.2.2 (latest)
MySQL-python (1.2.5)                          - Python interface to MySQL
mysql-connector-repackaged (0.3.1)            - MySQL driver written in Python

What am I missing ??

Upvotes: 0

Views: 1935

Answers (2)

Nuno Mariz
Nuno Mariz

Reputation: 591

The official MySQL Connector/Python in PyPI is mysql-connector-python. So pip install mysql-connector-python is the way to go.

Upvotes: 0

Timotej Arnuš
Timotej Arnuš

Reputation: 145

I have tried to install multiple versions of mysql-connector, however, I have found the problem. I had to change the configuration and set the interpreter to its default location and install mysql-connector once again with pip install mysql-connector-python

Upvotes: 1

Related Questions