Eclipse IDE Pydev 导入错误
我在尝试在 Eclipse 中安装 Pydev 以识别我安装的模块(例如 Beautiful Soup)时遇到问题。在首选项>中PyDev >我已经使用了自动配置(这不起作用),并且还尝试手动告诉 Pydev Python 解释器在哪里。我在 Macosx 上运行 Python 2.7.2。
如果我在 IDLE 中导入 BeautifulSoup 它工作正常。 Eclipse 似乎没有做的是加载站点包。回到自动配置,它加载 user/bin/python 作为解释器,我的系统路径由以下组成:
我尝试重新安装 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:
I have tried reinstalling Eclipse, following several tutorials on Youtube and also following other peoples solutions with no success. Can anyone help? Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当您按下自动配置或添加新的解释器时,它将显示一个对话框,其中包含在 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).
尝试更改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.