You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

PyDev打开.py文件报错‘Failed to create the part's controls’问题解决

解决Ubuntu 20.04下Eclipse 2022-09升级PyDev 10.0.0后打开.py文件报错Failed to create the part's controls的问题

问题场景

在Ubuntu 20.04系统的Eclipse 2022-09(4.25.0)中升级PyDev至10.0.0.20221001125版本后,打开.py文件时编辑器无内容显示,弹出错误提示:

Failed to create the part's controls

展开错误详情,核心报错栈信息为:

java.lang.AssertionError: Should never get here. Initial version: 2.7

问题原因

该问题由Eclipse配置使用Python 2.7解释器导致,PyDev 10.0.0版本已不再兼容Python 2.7环境。

解决方案

  • 卸载系统中的Python 2.7:
    sudo apt remove python2.7
    sudo apt autoremove
    
  • 打开Eclipse,依次进入Window > Preferences > PyDev > Interpreters > Python Interpreter
  • 在已配置的解释器列表中选中Python 2.7,点击Remove按钮将其移除
  • 点击New按钮,添加系统中已安装的Python 3.x版本作为默认解释器
  • 保存配置后重启Eclipse,即可正常打开.py文件

内容的提问来源于stack exchange,提问作者IsaacS

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.17 15:00:53