找不到MySQL连接器

问题描述 投票:0回答:1

我正在使用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

我想念什么?

python mysql-connector mysql-connector-python
1个回答
0
投票

我试图安装多个版本的mysql-connector,但是,我发现了问题。我必须更改配置将解释器设置为默认位置,然后再次使用pip install mysql-connector-python

安装mysql-connector。
© www.soinside.com 2019 - 2024. All rights reserved.