如何在PyDev中重置python解释器? [英] How to reset python interpreters in PyDev?

查看:69
本文介绍了如何在PyDev中重置python解释器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大约一年前,我在PyDev中保存了两个python解释器.从那以后,我从系统中卸载了这些解释器(它们是python 2.7),并安装了一个新的python 3.6.

I saved two python interpreters in PyDev a year ago or so. Since then I've uninstalled those interpreters from my system (they were python 2.7) and installed a new one python 3.6.

每次我重新启动Eclipse时,PyDev都会加载旧的解释器.然后,我必须进入设置,然后删除,应用并保存,然后添加新的解释器.添加新的解释器大约需要10分钟,因为它需要更新PYTHONPATH并加载所有模块.在这10分钟内,我无法使用Eclipse,也无法进行任何代码编辑.即使我保存了新的解释器,下次我重新启动Eclipse时,也会发生同样的事情.

Every time I restarts eclipse, PyDev loads my old interpreters. Then I have to go into the settings, remove then, apply and save, then add the new interpreter. Adding a new interpreter takes around 10 minutes because it needs to update the PYTHONPATH and load all modules. During this 10 minutes, I'm unable to use Eclipse, can't do any code editing whatsoever. Even if I save the new interpreter, next time I restart Eclipse, the same thing happens.

我尝试卸载Eclipse,卸载PyDev或删除我的Eclipse工作区或Eclipse工作区中的PyDev文件夹,但没有效果.PyDev在哪里存储解释器信息?我读到它应该将其存储在Eclipse工作区中,但事实并非如此,因为即使删除我的Eclipse工作区,它也会加载旧的解释器配置.

I tried uninstalling Eclipse, uninstalling PyDev, or delete my Eclipse workspace, or PyDev folder in eclipse workspace, it has no effect. Where does PyDev store the interpreter information?? I read that it should store it in the Eclipse workspace, but this cannot be the case, since even if I delete my Eclipse workspace, it loads the old interpreter configuration.

推荐答案

PyDev将解释器配置的配置保存在wokspace首选项中,现在,如果您使用的是Oomph,则可以选择为用户持久保存这些配置.创建新的工作区后,它将为您恢复这些首选项.

PyDev saves the configuration of the interpreter configuration in the wokspace preferences, now, if you're using Oomph, it has an option to persist those for the user and when a new workspace is created it'll restore those preferences for you.

所以,我认为正在发生的事情是您用Oomph记录了这些首选项,并且每当在PyDev Oomph中更改它们时都会恢复它.

So, what I think is happening is that you recorded those preferences with Oomph and whenever you change them in PyDev Oomph restores it.

一段时间之前,PyDev跟踪器中有一个类似的报告: https://www.brainwy.com/tracker/PyDev/671 .

There was a similar report in the PyDev tracker some time ago: https://www.brainwy.com/tracker/PyDev/671.

要解决此问题,您应该从Oomph中删除记录的首选项(请参阅: https://www.eclipse.org/community/eclipse_newsletter/2014/november/article2.php ).

To fix this you should remove the recorded preference from Oomph (see: https://www.eclipse.org/community/eclipse_newsletter/2014/november/article2.php).

这篇关于如何在PyDev中重置python解释器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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