将 MySQLdb 与 PyDev 集成
我有使用 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:
I then set my Eclipse PyDev plugin settings to go to the folder containing the MySQLdb stuff:
But my editor is still unable to get rid of the error, even after closing/opening the file and restarting Eclipse:
Here's what's contained at that directory (maybe I'm adding the wrong stuff to the path?:
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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通过从 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.