Python 在 Eclipse 中无法识别 Pydev
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19827404/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Pydev Not Recognized in Eclipse
提问by idalsin
I've been using PyDev within Eclipse on my Mac for about two years now. Updated Eclipse today, and suddenly PyDev is completely missing. Tried everything, included a complete uninstall and fresh install, but although PyDev shows up as installed in the menu, it appears nowhere else.
我已经在 Mac 上的 Eclipse 中使用 PyDev 大约两年了。今天更新了 Eclipse,突然 PyDev 完全不见了。尝试了所有方法,包括完全卸载和全新安装,但尽管 PyDev 在菜单中显示为已安装,但它在其他任何地方都没有出现。
PyDev version: 3.0.0.201311051910 Eclipse: Version: Kepler Service Release 1 Build id: 20130919-0819
PyDev 版本:3.0.0.201311051910 Eclipse:版本:Kepler Service Release 1 Build id:20130919-0819
I can't open a PyDev perspective, I can't create a new Python file, and I can't open an existing Python file without it just being seen as plain text.
我无法打开 PyDev 透视图,无法创建新的 Python 文件,也无法打开现有的 Python 文件,除非将其视为纯文本。
I've got a huge assignment due tonight, help appreciated.
我今晚有一个巨大的任务,感谢帮助。
采纳答案by Tommy
To see what the problem is, I upgraded from PyDev 2.8.2 to 3.0.0 just for this. It caused me a world of hurt. That version is filledwith bugs. Nothing is working for me, including the perspectives or the debugger. I just went back to 2.8.2 and all is well again. I am also on Kepler and Mac. Go to 2.8.2. YOu can uninstall pydev using eclipse, then simply install pydev using the easy zip file instructions here: http://pydev.org/manual_101_install.html.
为了看看问题出在哪里,我只是为了这个从 PyDev 2.8.2 升级到 3.0.0。它给我带来了一个痛苦的世界。该版本充满了错误。没有什么对我有用,包括透视图或调试器。我刚回到 2.8.2,一切都好起来了。我也在 Kepler 和 Mac 上。转至 2.8.2。您可以使用 eclipse 卸载 pydev,然后只需使用此处的简单 zip 文件说明安装 pydev:http://pydev.org/manual_101_install.html 。
3.0.0 was just released yesterday. They obviously have some fixing to do!
3.0.0 昨天刚刚发布。他们显然有一些修复工作要做!
回答by Tobx
Check if you are using Java 7, it is needed now for PyDev 3. Source: http://pydev.org/download.htmland PyDev bugtracker. After upgrading my java-version it worked for me again.
检查您是否使用 Java 7,PyDev 3 现在需要它。来源:http: //pydev.org/download.html和 PyDev bugtracker。升级我的 java 版本后,它再次对我有用。
回答by user3047383
![Kepler Pydev config] I had to spend lot of time to figure out why it is not working. But ultimately did. Download 2.8.2 zip instead and unzip in dropins folder as shown. Start eclipse with -clean option
![Kepler Pydev 配置] 我不得不花很多时间来弄清楚它为什么不起作用。但最终做到了。下载 2.8.2 zip 并在 dropins 文件夹中解压缩,如图所示。使用 -clean 选项启动 eclipse
回答by indivisible
Not enough rep to comment on Tobx's answer so I'll make a new one.
没有足够的代表来评论 Tobx 的回答,所以我会做一个新的。
You can install java7 but retain your current version and not affect your current set up by specifying which JVM Eclipse should use using the command line -vm option.
您可以通过使用命令行 -vm 选项指定应使用哪个 JVM Eclipse 来安装 java7 但保留当前版本并且不影响当前设置。
回答by azure
I debugged a python project (imported before). The Pydev menu has reappeared by only changing the current perspective to "Debug".
我调试了一个python项目(之前导入的)。Pydev 菜单重新出现,只需将当前透视图更改为“调试”。
I think opening the Pydev perspective through Window > Open Perspective > Other ... > Pydev would also create the Pydev menu.
我认为通过 Window > Open Perspective > Other ... > Pydev 打开 Pydev 透视图也会创建 Pydev 菜单。
回答by Hymany
If you can't / will not upgrade to Java 7:
如果您不能/不会升级到 Java 7:
Uninstall latest PyDev version
1. Help >> About Eclipse
2. Press button "Installation Details"
3. Select "PyDev for Eclipse"
4. Press button "Uninstall..."
5. Close, OK
卸载最新的 PyDev 版本
1. 帮助 >> 关于 Eclipse
2. 按“安装详细信息”按钮
3. 选择“PyDev for Eclipse”
4. 按“卸载...”按钮
5. 关闭,确定
Install version 2.8.2
1. Help >> Install New Software...
2. select in drop-down list "Work with:" PyDev Update Site - http://pydev.org/updates/
3. De-select option "Show only the latest versions of available software"
4. Select "PyDev for Eclipse, version 2.8.2"
5. Press button "Next>"
6. ...
n. Restart Eclipse (as proposed)
安装版本 2.8.2
1. 帮助 >> 安装新软件...
2. 在下拉列表中选择“与:”PyDev 更新站点 - http://pydev.org/updates/
3. 取消选择选项“仅显示可用软件的最新版本”
4. 选择“PyDev for Eclipse, version 2.8.2”
5. 按下按钮“Next>”
6. ...
n. 重新启动 Eclipse(按照建议)
回答by PhiM
The following solved the problem for me, on OS X Mavericks 10.9.2 initially with Java 1.7.0_55 (from Oracle, the standard Mavericks install I think, fully up to date)
以下为我解决了这个问题,在 OS X Mavericks 10.9.2 上最初使用 Java 1.7.0_55(来自 Oracle,我认为是标准的 Mavericks 安装,完全最新)
- check the available Java virtual machines using the terminal :
- 使用终端检查可用的 Java 虚拟机:
/usr/libexec/java_home -V
/usr/libexec/java_home -V
I initially only had Java 1.6 listed here (a similar check from within Eclipse also confirmed that it was running 1.6, not the available 1.7!)
我最初只列出了 Java 1.6(来自 Eclipse 的类似检查也确认它运行的是 1.6,而不是可用的 1.7!)
following posts suggesting that I had the Java 7 JRE but not the JDK, I installed the JDKfrom Oracle : http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
then checked again /usr/libexec/java_home -V ... and hurrah! 1.7 showing up !
Restarted Eclipse... didn't change anything else : the previously installed PyDev started to work (just had to re-open files in the editor)
以下帖子表明我有 Java 7 JRE 但没有 JDK,我从 Oracle安装了 JDK:http: //www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
然后再次检查 /usr/libexec/java_home -V ... 欢呼!1.7 登场!
重新启动 Eclipse... 没有改变其他任何东西:之前安装的 PyDev 开始工作(只需要在编辑器中重新打开文件)
回答by ianmatth
It seems a lot of PyDev/Eclipse issues are a matter of using the correct Java JRE/JDK and PyDev for the version of Eclipse you're running.
似乎很多 PyDev/Eclipse 问题都是针对您正在运行的 Eclipse 版本使用正确的 Java JRE/JDK 和 PyDev 的问题。
Release 5.2.0
5.2.0 版
Important PyDev now requires Java 8 and Eclipse 4.5 onwards.
重要 PyDev 现在需要 Java 8 和 Eclipse 4.5 以上。
PyDev 4.5.5 is the last release supporting Java 7 and Eclipse 3.8. See: update sites page (http://www.pydev.org/update_sites/index.html) for the update site of older versions of PyDev.
PyDev 4.5.5 是最后一个支持 Java 7 和 Eclipse 3.8 的版本。有关旧版本 PyDev 的更新站点,请参阅:更新站点页面 ( http://www.pydev.org/update_sites/index.html)。
回答by Racheal
At start i was also facing same error that : The solution is not provide while installing PyDev - Python IDE for Eclipse 6.3.2 and when I am When trying to install I receive the following message: Unable to read repository at https://dl.bintray.com/fabioz/pydev/latest/content.xml. ?
一开始我也面临同样的错误:安装 PyDev - Python IDE for Eclipse 6.3.2 时未提供解决方案,当我尝试安装时,我收到以下消息:无法在https://dl读取存储库.bintray.com/fabioz/pydev/latest/content.xml。?
Then i came up with the final solution :
然后我想出了最终的解决方案:
follow the steps :
按照步骤 :
Online Install
在线安装
The URL for installation of the feature is http://pydev.org/updates. You can use that URL to Install New Software... from the Help menu if the Eclipse Marketplace is not doing what you want.
安装该功能的 URL 是http://pydev.org/updates。如果 Eclipse Marketplace 没有按照您的意愿运行,您可以使用该 URL 从“帮助”菜单中安装新软件...。
and uncheck all the options mentioned below on Install New Software Window like: Uncheck :
并取消选中下面在安装新软件窗口中提到的所有选项,例如:取消选中:
1.Show only the latest versions of available software
2.Group Items by category
3.Show only software applicable to target environment
4.Contact all update sites during install to find required software
Offline Install
离线安装
If you meet the requirements (below) and continue to have problems with the update site, you can download to install offline. Get it from SourceForge (or follow the link from PyDev's website to SourceForge).
如果您满足要求(如下)并且更新站点仍然存在问题,您可以下载以进行离线安装。从 SourceForge 获取它(或按照 PyDev 网站上的链接到 SourceForge)。
and uncheck all the options mentioned below on Install New Software Window like: Uncheck :
并取消选中下面在安装新软件窗口中提到的所有选项,例如:取消选中:
1.Show only the latest versions of available software
2.Group Items by category
3.Show only software applicable to target environment
4.Contact all update sites during install to find required software