我正在使用Python3,我尝试使用此命令安装mysql.connector
pip install mysql-connector-python-rf
但是当我运行代码时,我得到了ModuleNotFoundError:没有名为'mysql'的模块
如果我在pip search mysql-connector-python
中输入提示,它将找到以下版本:
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
我想念什么?
我试图安装多个版本的mysql-connector,但是,我发现了问题。我必须更改配置和将解释器设置为默认位置,然后再次使用pip install mysql-connector-python