为什么在VSCODE中不允许我导入mysql?
大家好,你好吗,请谁可以给我一个解决方案:
import mysql.connector ***Import "mysql.connector" could not be resolved***
当我尝试导入mysql.connector时,我会收到这个错误
Hello everyone how are you, please who can give me a solution to this:
import mysql.connector ***Import "mysql.connector" could not be resolved***
when i try to import mysql.connector i get that error
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
1。问题的原因“导入”无法解决”
问题的原因是python.exe的路径文件夹中没有自定义模块,因此Python无法读取我们自定义模块的代码。
2。解决方案
将模块路径添加到当前编译的路径。
打开当前Floder的设置。
将以下代码添加到您的设置中。
这是给出的
1. Causes of problem "Import "sth" could not be resolved"
The reason for the problem is that there is no customized module in the path folder of python.exe, so Python can't read the code of our customized module.
2. Solution
Add the module path to the currently compiled path.
Open the setting.json of current floder.
Add the following code into your setting.json
]