eclipse pydev importerror: 没有名为线程的模块,pydev 升级后调试不再有效
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3326740/
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 importerror: no module named thread, debugging no longer works after pydev upgrade
提问by Tim Richardson
My Eclipse 3.6 /PyDev setup just did a pydev upgrade to 1.6.0.2010071813 and debugging no longer works. My default python interpreter is 3.1 although I doubt that matters. Until the Eclipse upgrade of pydev, it was working very nicely.
我的 Eclipse 3.6 /PyDev 安装程序只是将 pydev 升级到 1.6.0.2010071813 并且调试不再有效。我的默认 python 解释器是 3.1,虽然我怀疑这很重要。直到 pydev 的 Eclipse 升级,它运行得非常好。
回答by Fabio Zadrozny
This is already fixed in the current nightly (1.6.1). See: http://pydev.org/download.htmlfor details on getting it.
这已经在当前的 nightly (1.6.1) 中修复了。有关获取它的详细信息,请参阅:http: //pydev.org/download.html。
Note that you can just change that "import thread" locally (in org.python.pydev.debug/pysrc/pydevd.py) for:
请注意,您可以在本地(在 org.python.pydev.debug/pysrc/pydevd.py 中)更改“导入线程”:
try:
import thread
except ImportError:
import _thread as thread #Py3K changed it.
Cheers,
干杯,
Fabio
法比奥
回答by Tim Richardson
Downgrade to 1.5.9. Eclipse updates has the option to show all versions, but by default it shows only the latest version. Turn off that setting, and install 1.5.9. It works with python 3.1
降级到 1.5.9。Eclipse 更新可以选择显示所有版本,但默认情况下它只显示最新版本。关闭该设置,然后安装 1.5.9。它适用于 python 3.1
回答by Mirko Boehm
Same problem here, I am on MacOs 10.6. I tried to reinitialize the configured interpreters, it did not fix the problem. I switched between the built-in Python 2.6 and the newer 2.6.5 provided by MacPorts, this also did not fix it. Looks like it needs another update?
同样的问题,我在 MacOs 10.6 上。我尝试重新初始化配置的解释器,但没有解决问题。我在内置的 Python 2.6 和 MacPorts 提供的较新的 2.6.5 之间切换,这也没有修复它。看起来它需要另一个更新?
Update: I just tried the same upgrade on Linux (this time with a backup of the Eclipse setup :-) ), and experienced the same problem. It is not a platform issue on Mac.
更新:我刚刚在 Linux 上尝试了相同的升级(这次使用 Eclipse 设置的备份 :-) ),并遇到了同样的问题。这不是 Mac 上的平台问题。