简体   繁体   English

ModuleNotFoundError: No module named 'mysql' in Python 3.8.10 and Requirement already meet in anaconda location problem是什么原因?

[英]What is the reason of ModuleNotFoundError: No module named 'mysql' in Python 3.8.10 and Requirement already satisfied in anaconda location problem?

I need to import mysql-connector and I installed it by using pip install mysql-connector-python .我需要导入 mysql-connector 并使用pip install mysql-connector-python安装它。 After the installation, I can see the same error is displayed.安装后,我可以看到显示相同的错误。

源代码

错误图像 - ModuleNotFoundError: 没有名为“mysql”的模块

After that again I tried to install mysql connector, but it displayed that Requirement already satisfied and show a path in anaconda lib folder.在那之后,我再次尝试安装 mysql 连接器,但它显示Requirement 已经满足并显示 anaconda lib 文件夹中的路径。

已经存在

Is there any effect from previous installation on Anaconda and how to import mysql-connector to code?之前在 Anaconda 上的安装是否有任何影响以及如何将 mysql-connector 导入代码?

As a solution for that, I changed the interpreter of the code into ('base': conda) .作为解决方案,我将代码的解释器更改为('base': conda) It worked correctly without any error.它工作正常,没有任何错误。

解决方案_更改解释器

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ModuleNotFoundError:没有名为“dateutil”的模块,但已满足要求 - ModuleNotFoundError: No module named 'dateutil' but Requirement already satisfied Python 模块问题 - “ModuleNotFoundError”和“已满足要求” - Python module issue - “ModuleNotFoundError” and “Requirement already satisfied” ModuleNotFoundError:即使要求已经满足,也没有名为“selenium”的模块 - ModuleNotFoundError: No module named 'selenium' even though Requirement already satisfied 没有名为“ PIL”的模块,但已满足要求 - No module named 'PIL' but requirement Pillow already satisfied 没有名为“numpy”的模块,但已满足要求:numpy - No module named 'numpy' but Requirement already satisfied: numpy 出现错误“ modulenotfounderror:没有名为“ google”的模块”,但是当尝试通过命令提示符安装时,它说要求已经满足 - getting error “modulenotfounderror: No module named 'google'” but when trying to install through command prompt it says requirement already satisfied ModuleNotFoundError:没有名为“numpy”的模块。 在 pip 安装 numpy 后获取“要求已满足”消息 - ModuleNotFoundError: No module named 'numpy'. Get “Requirement already satisfied” message after pip install numpy 没有名为 Selenium 的模块; 要求已经满足 - No module named Selenium; requirement already satisfied Jupyter note book ModuleNotFoundError: No module named 'psycopg2' while Requirement already satisfied - Jupyter note book ModuleNotFoundError: No module named 'psycopg2' while Requirement already satisfied 需求已经满足但是ImportError:没有名为“pkg”的模块 - Requirement already satisfied but ImportError: No module named “pkg”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM