在 Eclipse 中配置 Pydev Interpreter 以使用 Enthought Python Distribution [英] Configuring Pydev Interpreter in Eclipse to use Enthought Python Distribution

查看:66
本文介绍了在 Eclipse 中配置 Pydev Interpreter 以使用 Enthought Python Distribution的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我今天在 Mac OSX 10.5.8 上下载了 Eclipse (3.5.2) 的 Pydev 插件.为了能够使用 Pydev,我需要在 Eclipse 中配置解释器.我不清楚我到底需要在这里做什么,或者这一步做什么.我想确保当我使用 Pydev 从 Eclipse 运行程序时,它使用我安装的 Enthought Python Distribution (EPD),并且可以使用 EPD 附带的所有包.有人可以告诉我我需要遵循的简单步骤.

如果我点击自动配置,它会显示一堆带有路径的文件夹

/System/Library/Frameworks/Python.Framework/Versions/2.5/...

但我知道 EPD 自带的 Python 是 2.6.4 版本,所以 autoconfig 没有选择 EPD.

感谢您的帮助.

<小时>

更新 - 解决方案

如果其他人有兴趣学习如何做到这一点,请参阅下面 mlvljr 的答案中的第一个链接.使用那里的解决方案,除了解决方案中建议的 Shift+Cmd+G 并没有帮助我看到 Python.app 包的内部.要查看内部,请使用 Finder 中的齿轮"下拉菜单并选择显示包内容"

解决方案

至少在 Windows 上,这似乎是可行的:

  1. [导航 Eclipse 菜单] "Window"->"Preferences"->"PyDev"->"Interpreter - Python"-> "New"(在你尝试使用的 "Auto Config" 旁边,如果我没猜错的话)>

  2. [键入或粘贴到文本框中] 解释器名称", 解释器可执行文件"

  3. 点击确定" :))

[更新]

来自 Enthought Python Distribution Readme.txt (EPD.mkpg/Contents/Resources/Readme.txt in epd-6.1-1-macosx-i386.dmg EPD 磁盘 32 位 MacOS 磁盘映像):

应用程序安装到/Applications/EPD32-6.1
以及底层的 Python 框架/Library/Frameworks/Python.framework/Versions/6.1

所以,Interpreter Executable 必须是:

/Library/Frameworks/Python.framework/Versions/6.1/python

您可以提供(几乎)任何您喜欢的Interpreter Name.:)

希望这会有所帮助.

如果这没有帮助,谷歌搜索 Error getting info on interpreter" 给出以下信息(问题可能与 Eclipse 版本有关(较旧的有错误))和符号链接与实际路径问题):

  1. 在 OS X 10.5 上安装 PyDev.2

  2. [Pydev-users] [pydev- 用户] mayapy on PyDev Maya Python 在 OSX 上运行

  3. 无法设置python首选项中的交互者 - ID:1523582(在那里展开 "comments")

I downloaded Pydev plugin for Eclipse (3.5.2) today on Mac OSX 10.5.8. To be able to use Pydev, I need to configure the interpreter in Eclipse. I am not clear what exactly I need to do here, or what this step does. I want to make sure that when I run programs from Eclipse using Pydev, it uses the Enthought Python Distribution (EPD) I have installed, and can use all the packages that come with EPD. Can someone please tell me simple steps that I need to follow.

If I click on autoconfig, it shows a bunch of folders with the path

/System/Library/Frameworks/Python.Framework/Versions/2.5/...

But I know that the Python that came with EPD is version 2.6.4, so autoconfig is not choosing EPD.

Thanks for any help.


UPDATE - solution

If anyone else is interested in learning how to do this, see the first link in the answer by mlvljr below. Use the solution there EXCEPT that as suggested in the solution, Shift+Cmd+G, did not help me see inside the Python.app package. To look inside it, use the "gear" drop down menu in the Finder and choose "Show Package Contents"

解决方案

At least on Windows, this seems to doable via:

  1. [Navigate Eclipse menus] "Window"->"Preferences"->"PyDev"->"Interpreter - Python"-> "New" (which is next to "Auto Config" you tried to use, if I get it right)

  2. [Type or paste into textboxes] "Interpreter Name", "Interpreter Executable"

  3. Click "OK" :))

[UPDATE]

From the Enthought Python Distribution Readme.txt (EPD.mkpg/Contents/Resources/Readme.txt in epd-6.1-1-macosx-i386.dmg EPD disk 32-bit MacOS disk image):

Applications are installed into /Applications/EPD32-6.1
and the underlying Python framework into /Library/Frameworks/Python.framework/Versions/6.1

So, Interpreter Executable must be:

/Library/Frameworks/Python.framework/Versions/6.1/python

You can supply (almost) any Interpreter Name you like. :)

Hope this helps.

[EDIT]

If this does not help, google search for "Error getting info on interpreter" gives the following (the problem may have to do with Eclipse version (older have bugs) and the symlink vs actual path problem):

  1. Installing PyDev on OS X 10.5.2

  2. [Pydev-users] [pydev - Users] mayapy on PyDev Maya Python is running on OSX

  3. Cannot set python interperter in preferences - ID: 1523582 (unfold "comments" there)

这篇关于在 Eclipse 中配置 Pydev Interpreter 以使用 Enthought Python Distribution的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆