将 MySQLdb 与 PyDev 集成

发布于 2025-01-02 22:54:41 字数 754 浏览 3 评论 0原文

我有使用 apt-get install python-mysqldb 下载的 MySQLdb 源文件夹的路径。当我从命令行运行导入时,它工作正常: 命令行

然后,我将 Eclipse PyDev 插件设置设置为转到包含 MySQLdb 内容的文件夹:

我的编辑器仍然无法消除错误,即使在关闭/打开文件并重新启动 Eclipse 后也是如此: 失败

这是该目录中包含的内容(也许我在路径中添加了错误的内容?: 目录

有没有人看到我做错了什么,或者可以为我提供一些关于如何让这个东西在 Eclipse PyDev 中工作的见解?

谢谢, 凯尔

I have my path to the MySQLdb source folder I downloaded using apt-get install python-mysqldb. When I run the import from the command line, it works fine:
command line

I then set my Eclipse PyDev plugin settings to go to the folder containing the MySQLdb stuff:
pydev path settings

But my editor is still unable to get rid of the error, even after closing/opening the file and restarting Eclipse:
fail

Here's what's contained at that directory (maybe I'm adding the wrong stuff to the path?:
directory

Does anyone see anything I'm doing wrong or can provide me some insight on how I can get this thing to work within Eclipse PyDev?

Thanks,
Kyle

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

森末i 2025-01-09 22:54:41

通过从 eclipse 中的 pydev 首选项对话框中删除 python 解释器,保存更改,然后重新添加相同的 python 解释器,解决了该问题。

The problem was solved by removing the python interpreter from the pydev preferences dialog in eclipse, saving the changes, then re-adding the same python interpreter.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文