请需要修复此问题:ModuleNotFoundError:没有名为“mysql”的模块

2024-09-28 05:28:23 发布

您现在位置:Python中文网/ 问答频道 /正文

Traceback (most recent call last):
  File "C:/Users/Admin/Desktop/testttt.py", line 1, in <module>
    import mysql.connector
ModuleNotFoundError: No module named 'mysql'

这是我的密码

import mysql.connector

这是我用来下载python连接器的链接 https://dev.mysql.com/downloads/connector/python/

我在用IDEL

有没有关于修复此错误的建议

注意,如果我在win 10 Comm提示符中调用import mysql,我不会得到任何错误 但在我看来,我犯了这个错误


Tags: importmostconnectoradmin错误mysqlcallusers
1条回答
网友
1楼 · 发布于 2024-09-28 05:28:23

我不确定所有的信息,但让我试着帮助你。我建议使用pip(python包管理器)来安装MySQL连接器。您可以按照此处的建议运行pip install mysql-connector-pythonhttps://dev.mysql.com/doc/connector-python/en/connector-python-installation-binary.html。让我知道这是否有帮助

相关问题 更多 >

    热门问题