Eclipse IDE Pydev 导入错误

发布于 2024-12-23 11:19:47 字数 416 浏览 3 评论 0原文

我在尝试在 Eclipse 中安装 Pydev 以识别我安装的模块(例如 Beautiful Soup)时遇到问题。在首选项>中PyDev >我已经使用了自动配置(这不起作用),并且还尝试手动告诉 Pydev Python 解释器在哪里。我在 Macosx 上运行 Python 2.7.2。

如果我在 IDLE 中导入 BeautifulSoup 它工作正常。 Eclipse 似乎没有做的是加载站点包。回到自动配置,它加载 user/bin/python 作为解释器,我的系统路径由以下组成: pydev system PYTHONPATH

我尝试重新安装 Eclipse,遵循 Youtube 上的几个教程,也遵循其他人的解决方案,但没有成功。有人可以帮忙吗?谢谢。

I am having issues in trying to get the Pydev install in Eclipse to recognise my installed modules such as Beautiful Soup. Within the Preferences > PyDev > Interpreter I have used the Auto Config (which didn't work) and also tried telling Pydev where the Python interpreter is manually. I am on Macosx running Python 2.7.2.

If I import BeautifulSoup within IDLE it works fine. What Eclipse doesn't seem to do is load the site-packages. Going back to the auto-config it loads user/bin/python as the Interpreter and my system path consists of these: pydev system PYTHONPATH

I have tried reinstalling Eclipse, following several tutorials on Youtube and also following other peoples solutions with no success. Can anyone help? Thanks.

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

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

发布评论

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

评论(2

寄意 2024-12-30 11:19:47

当您按下自动配置或添加新的解释器时,它将显示一个对话框,其中包含在 PYTHONPATH 中找到的所有路径,但默认情况下不会检查某些路径(它只检查它认为常见的路径)所有项目——即:在Python安装下),所以,尝试检查站点包是否出现在该对话框中,并检查它是否存在...

另外,我记得MacOS有一个问题,它不发货库的源文件,所以,这可能这也是一个问题(在这种情况下,我建议从 python.org 安装 Python 版本,而不是使用 MacOS 中预安装的版本)。

When you press the auto-config or add a new interpreter, it'll show a dialog with all the paths it found to be in the PYTHONPATH, but some are not checked by default (it only leaves checked what it believes to be common to all projects -- i.e.: under the python installation), so, try checking if the site-packages appear at that dialog and check it if it's there...

Also, I remember that MacOS has an issue in which it doesn't ship source files for the libraries, so, that may be an issue too (in which case I'd recommend installing a Python version from python.org instead of using the one that comes pre-installed in MacOS).

沉默的熊 2024-12-30 11:19:47

尝试更改eclipse的代理设置。

将“活动提供商”选择为“手动”。设置 HTTP/HTTPS 代理。如果已设置,请清除 SOCKS 代理。(选择 SOCKS proxy raw 并单击“清除”按钮)重新启动 Eclipse 以应用这些设置。

Try to change proxy settings of eclipse.

Select Active Provider to "Manual". Set HTTP/HTTPS proxy. Clear SOCKS proxy if this is set.(select SOCKS proxy raw and click "Clear" button) Restart Eclipse to apply these settings.

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