Discuss / Python / mac上connector的安装

mac上connector的安装

Topic source

Nil_大黄

#1 Created at ... [Delete] [Delete and Lock User]

--allow-external报错

$ pip install mysql-connector-python --allow-external mysql-connector-python

之后使用

$ pip install mysql-connector

建立conn的时候报错"mysql.connector.errors.NotSupportedError: Authentication plugin 'caching_sha2_password' is not supported"

可以先卸载

$ pip uninstall mysql-connector

再正确安装另一个版本

$ pip install mysql-connector-python

?

window也是一样的

determined_xw

#4 Created at ... [Delete] [Delete and Lock User]

nice

Cao Yi

#5 Created at ... [Delete] [Delete and Lock User]

可能和Python的版本有关,但和操作系统无关。

我的环境是 Windows 11 + Python 3.11

装驱动用:

pip install mysql-connector-python

即可,且不能添加参数 --allow-external mysql-connector-python

另外,如果安装错了想要卸载,可以通过通过

pip list

列出模块的名称,再用如下命令卸载:

pip uninstall {name}

juven永恒

#6 Created at ... [Delete] [Delete and Lock User]

这是廖2016年写的了,pip的版本升级好多次了,--allow-external应该是18年就不能用了,直接

pip install mysql-connector-python

就行


  • 1

Reply