使用 Snap 重新安装后,启动时出现 PyCharm 错误“插件需要缺少‘Python’的类加载器”

Posted

技术标签:

【中文标题】使用 Snap 重新安装后,启动时出现 PyCharm 错误“插件需要缺少‘Python’的类加载器”【英文标题】:PyCharm Error on Startup "plugin requires missing class loader for 'Python' " after reinstalling using Snap 【发布时间】:2021-08-22 11:19:15 【问题描述】:

从包含太多文件的文件夹打开创建项目后,PyCharm 2021.1.2 停止工作。 所以我尝试使用

重新安装Pycharm
snap remove pycharm-professional --purge
rm -rf ~/snap/pycharm-professional/
rm -rf ~/.config/JetBrains
rm -rf ~/pycharm2021.1
snap install pycharm-professional --purge

当我从终端运行pycharm-professional 时,我在标准输出上收到很多错误,并且只有启动画面加载并停留。大多数错误说

“插件需要缺少'Python'的类加载器”

~$ pycharm-professional 
2021-06-04 13:06:29,070 [  10149]   WARN - llij.ide.plugins.PluginManager - Resource bundle redefinition for plugin 'com.jetbrains.pycharm.pro.customization'. Old value: messages.ActionsBundle, new value: messages.PyBundle 
2021-06-04 13:06:31,558 [  12637]  ERROR - llij.ide.plugins.PluginManager - The Datalore (id=com.jetbrains.intellij.datalore, path=/snap/pycharm-professional/244/plugins/datalore-intellij-plugin) plugin requires missing class loader for 'Python' 
java.lang.Throwable: The Datalore (id=com.jetbrains.intellij.datalore, path=/snap/pycharm-professional/244/plugins/datalore-intellij-plugin) plugin requires missing class loader for 'Python'
[...]
2021-06-04 13:06:31,560 [  12639]  ERROR - llij.ide.plugins.PluginManager - PyCharm 2021.1.2  Build #PY-211.7442.45 
2021-06-04 13:06:31,562 [  12641]  ERROR - llij.ide.plugins.PluginManager - JDK: 11.0.11; VM: Dynamic Code Evolution 64-Bit Server VM; Vendor: JetBrains s.r.o. 
2021-06-04 13:06:31,562 [  12641]  ERROR - llij.ide.plugins.PluginManager - OS: Linux 
2021-06-04 13:06:31,562 [  12641]  ERROR - llij.ide.plugins.PluginManager - The PyCharm Professional Customization (id=com.jetbrains.pycharm.pro.customization, path=/snap/pycharm-professional/244/plugins/pythonIDE) plugin requires missing class loader for 'Python' 
java.lang.Throwable: The PyCharm Professional Customization (id=com.jetbrains.pycharm.pro.customization, path=/snap/pycharm-professional/244/plugins/pythonIDE) plugin requires missing class loader for 'Python'
[...]
2021-06-04 13:06:31,562 [  12641]  ERROR - llij.ide.plugins.PluginManager - PyCharm 2021.1.2  Build #PY-211.7442.45 
2021-06-04 13:06:31,562 [  12641]  ERROR - llij.ide.plugins.PluginManager - JDK: 11.0.11; VM: Dynamic Code Evolution 64-Bit Server VM; Vendor: JetBrains s.r.o. 
2021-06-04 13:06:31,562 [  12641]  ERROR - llij.ide.plugins.PluginManager - OS: Linux 
2021-06-04 13:06:31,562 [  12641]  ERROR - llij.ide.plugins.PluginManager - The Shared Indexes for Python (id=com.jetbrains.python.sharedIndexes, path=/snap/pycharm-professional/244/plugins/python-sharedIndexes) plugin requires missing class loader for 'Python' 
java.lang.Throwable: The Shared Indexes for Python (id=com.jetbrains.python.sharedIndexes, path=/snap/pycharm-professional/244/plugins/python-sharedIndexes) plugin requires missing class loader for 'Python'
[...]
2021-06-04 13:06:31,563 [  12642]  ERROR - llij.ide.plugins.PluginManager - PyCharm 2021.1.2  Build #PY-211.7442.45 
2021-06-04 13:06:31,563 [  12642]  ERROR - llij.ide.plugins.PluginManager - JDK: 11.0.11; VM: Dynamic Code Evolution 64-Bit Server VM; Vendor: JetBrains s.r.o. 
2021-06-04 13:06:31,563 [  12642]  ERROR - llij.ide.plugins.PluginManager - OS: Linux 
2021-06-04 13:06:34,351 [  15430]  ERROR - ntellij.idea.ApplicationLoader - Cannot create class com.jetbrains.python.PyCharmCorePluginConfigurator (classloader=PluginClassLoader(plugin=PluginDescriptor(name=PyCharm Professional Customization, id=com.jetbrains.pycharm.pro.customization, descriptorPath=plugin.xml, path=/snap/pycharm-professional/244/plugins/pythonIDE, version=211.7442.45, package=null), packagePrefix=null, instanceId=90, state=active)) 
com.intellij.diagnostic.PluginException: Cannot create class com.jetbrains.python.PyCharmCorePluginConfigurator (classloader=PluginClassLoader(plugin=PluginDescriptor(name=PyCharm Professional Customization, id=com.jetbrains.pycharm.pro.customization, descriptorPath=plugin.xml, path=/snap/pycharm-professional/244/plugins/pythonIDE, version=211.7442.45, package=null), packagePrefix=null, instanceId=90, state=active))
[...]
2021-06-04 13:06:34,427 [  15506]  ERROR - ntellij.idea.ApplicationLoader - PyCharm 2021.1.2  Build #PY-211.7442.45 
2021-06-04 13:06:34,427 [  15506]  ERROR - ntellij.idea.ApplicationLoader - JDK: 11.0.11; VM: Dynamic Code Evolution 64-Bit Server VM; Vendor: JetBrains s.r.o. 
2021-06-04 13:06:34,427 [  15506]  ERROR - ntellij.idea.ApplicationLoader - OS: Linux 
2021-06-04 13:06:34,544 [  15623]  ERROR - ntellij.idea.ApplicationLoader - Last Action:  
2021-06-04 13:06:36,283 [  17362]   WARN - nSystem.impl.ActionManagerImpl - keymap "Visual Studio" not found [Plugin: com.intellij] 
2021-06-04 13:06:36,286 [  17365]   WARN - nSystem.impl.ActionManagerImpl - keymap "Eclipse" not found [Plugin: com.intellij] 
2021-06-04 13:06:36,286 [  17365]   WARN - nSystem.impl.ActionManagerImpl - keymap "NetBeans 6.5" not found [Plugin: com.intellij] 
2021-06-04 13:06:36,286 [  17365]   WARN - nSystem.impl.ActionManagerImpl - keymap "Visual Studio" not found [Plugin: com.intellij] 
2021-06-04 13:06:36,300 [  17379]   WARN - nSystem.impl.ActionManagerImpl - keymap "Visual Studio" not found [Plugin: htmlTools] 
2021-06-04 13:06:38,241 [  19320]   WARN - nSystem.impl.ActionManagerImpl - keymap "Eclipse" not found [Plugin: org.jetbrains.plugins.github] 
2021-06-04 13:06:38,407 [  19486]   WARN - nSystem.impl.ActionManagerImpl - keymap "Eclipse" not found [Plugin: javascript] 
2021-06-04 13:06:38,407 [  19486]   WARN - nSystem.impl.ActionManagerImpl - keymap "Visual Studio" not found [Plugin: JavaScript] 
2021-06-04 13:06:38,421 [  19500]   WARN - nSystem.impl.ActionManagerImpl - keymap "Eclipse" not found [Plugin: Pythonid] 
2021-06-04 13:06:38,421 [  19500]   WARN - nSystem.impl.ActionManagerImpl - keymap "NetBeans 6.5" not found [Plugin: Pythonid] 
2021-06-04 13:06:38,422 [  19501]   WARN - nSystem.impl.ActionManagerImpl - keymap "Visual Studio" not found [Plugin: Pythonid] 
2021-06-04 13:06:38,422 [  19501]   WARN - nSystem.impl.ActionManagerImpl - keymap "Eclipse" not found [Plugin: Pythonid] 
2021-06-04 13:06:39,646 [  20725]  ERROR - nSystem.impl.ActionManagerImpl - Cannot resolve resource bundle messages.PyBundle for action <action id="PyMarkResourceRoot" class="com.jetbrains.python.resourceRoots.PyMarkResourceRoot">
  <add-to-group group-id="MarkRootGroup" />
</action> [Plugin: com.jetbrains.pycharm.pro.customization] 
com.intellij.diagnostic.PluginException: Cannot resolve resource bundle messages.PyBundle for action <action id="PyMarkResourceRoot" class="com.jetbrains.python.resourceRoots.PyMarkResourceRoot">
  <add-to-group group-id="MarkRootGroup" />
</action> [Plugin: com.jetbrains.pycharm.pro.customization]
[...]
2021-06-04 13:06:39,647 [  20726]  ERROR - nSystem.impl.ActionManagerImpl - PyCharm 2021.1.2  Build #PY-211.7442.45 
2021-06-04 13:06:39,647 [  20726]  ERROR - nSystem.impl.ActionManagerImpl - JDK: 11.0.11; VM: Dynamic Code Evolution 64-Bit Server VM; Vendor: JetBrains s.r.o. 
2021-06-04 13:06:39,647 [  20726]  ERROR - nSystem.impl.ActionManagerImpl - OS: Linux 
2021-06-04 13:06:39,647 [  20726]  ERROR - nSystem.impl.ActionManagerImpl - Last Action:  
2021-06-04 13:06:39,648 [  20727]  ERROR - nSystem.impl.ActionManagerImpl - Cannot resolve resource bundle messages.PyBundle for action <action id="UnmarkResourceRoot" class="com.intellij.webcore.resourceRoots.UnmarkResourceRootAction">
  <add-to-group group-id="MarkRootGroup" />
</action> [Plugin: com.jetbrains.pycharm.pro.customization] 
com.intellij.diagnostic.PluginException: Cannot resolve resource bundle messages.PyBundle for action <action id="UnmarkResourceRoot" class="com.intellij.webcore.resourceRoots.UnmarkResourceRootAction">
  <add-to-group group-id="MarkRootGroup" />
</action> [Plugin: com.jetbrains.pycharm.pro.customization]
[...]
2021-06-04 13:06:39,648 [  20727]  ERROR - nSystem.impl.ActionManagerImpl - PyCharm 2021.1.2  Build #PY-211.7442.45 
2021-06-04 13:06:39,648 [  20727]  ERROR - nSystem.impl.ActionManagerImpl - JDK: 11.0.11; VM: Dynamic Code Evolution 64-Bit Server VM; Vendor: JetBrains s.r.o. 
2021-06-04 13:06:39,648 [  20727]  ERROR - nSystem.impl.ActionManagerImpl - OS: Linux 
2021-06-04 13:06:39,648 [  20727]  ERROR - nSystem.impl.ActionManagerImpl - Last Action:  
2021-06-04 13:06:40,106 [  21185]  ERROR - nSystem.impl.ActionManagerImpl -  [Plugin: com.jetbrains.pycharm.pro.customization] 
com.intellij.diagnostic.PluginException:  [Plugin: com.jetbrains.pycharm.pro.customization]
[...]
2021-06-04 13:06:40,198 [  21277]  ERROR - nSystem.impl.ActionManagerImpl - PyCharm 2021.1.2  Build #PY-211.7442.45 
2021-06-04 13:06:40,198 [  21277]  ERROR - nSystem.impl.ActionManagerImpl - JDK: 11.0.11; VM: Dynamic Code Evolution 64-Bit Server VM; Vendor: JetBrains s.r.o. 
2021-06-04 13:06:40,198 [  21277]  ERROR - nSystem.impl.ActionManagerImpl - OS: Linux 
2021-06-04 13:06:40,198 [  21277]  ERROR - nSystem.impl.ActionManagerImpl - Last Action:  
2021-06-04 13:06:40,199 [  21278]  ERROR - ctionSystem.DefaultActionGroup - Null child action in group  () of class class com.intellij.openapi.actionSystem.DefaultActionGroup, id=WelcomeScreen.CreateDirectoryProject 
java.lang.Throwable: Null child action in group  () of class class com.intellij.openapi.actionSystem.DefaultActionGroup, id=WelcomeScreen.CreateDirectoryProject
[...]
2021-06-04 13:06:40,199 [  21278]  ERROR - ctionSystem.DefaultActionGroup - PyCharm 2021.1.2  Build #PY-211.7442.45 
2021-06-04 13:06:40,199 [  21278]  ERROR - ctionSystem.DefaultActionGroup - JDK: 11.0.11; VM: Dynamic Code Evolution 64-Bit Server VM; Vendor: JetBrains s.r.o. 
2021-06-04 13:06:40,199 [  21278]  ERROR - ctionSystem.DefaultActionGroup - OS: Linux 
2021-06-04 13:06:40,200 [  21279]  ERROR - ctionSystem.DefaultActionGroup - Last Action:  
2021-06-04 13:06:40,200 [  21279]  ERROR - ctionSystem.DefaultActionGroup - Can't unstub Open (Start editing code in the specified file or directory.) 
java.lang.Throwable: Can't unstub Open (Start editing code in the specified file or directory.)
[...]
2021-06-04 13:06:40,200 [  21279]  ERROR - ctionSystem.DefaultActionGroup - PyCharm 2021.1.2  Build #PY-211.7442.45 
2021-06-04 13:06:40,200 [  21279]  ERROR - ctionSystem.DefaultActionGroup - JDK: 11.0.11; VM: Dynamic Code Evolution 64-Bit Server VM; Vendor: JetBrains s.r.o. 
2021-06-04 13:06:40,200 [  21279]  ERROR - ctionSystem.DefaultActionGroup - OS: Linux 
2021-06-04 13:06:40,200 [  21279]  ERROR - ctionSystem.DefaultActionGroup - Last Action:  
2021-06-04 13:06:40,200 [  21279]  ERROR - nsions.impl.ExtensionPointImpl - Index 1 out of bounds for length 1 
java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
[...]
2021-06-04 13:06:40,201 [  21280]  ERROR - nsions.impl.ExtensionPointImpl - PyCharm 2021.1.2  Build #PY-211.7442.45 
2021-06-04 13:06:40,201 [  21280]  ERROR - nsions.impl.ExtensionPointImpl - JDK: 11.0.11; VM: Dynamic Code Evolution 64-Bit Server VM; Vendor: JetBrains s.r.o. 
2021-06-04 13:06:40,201 [  21280]  ERROR - nsions.impl.ExtensionPointImpl - OS: Linux 
2021-06-04 13:06:40,201 [  21280]  ERROR - nsions.impl.ExtensionPointImpl - Last Action:  
2021-06-04 13:06:40,201 [  21280]  ERROR - pplication.impl.LaterInvocator - No implementation of `com.intellij.welcomeFrameProvider` extension point 
java.lang.IllegalStateException: No implementation of `com.intellij.welcomeFrameProvider` extension point
[...]
2021-06-04 13:06:40,202 [  21281]  ERROR - pplication.impl.LaterInvocator - PyCharm 2021.1.2  Build #PY-211.7442.45 
2021-06-04 13:06:40,202 [  21281]  ERROR - pplication.impl.LaterInvocator - JDK: 11.0.11; VM: Dynamic Code Evolution 64-Bit Server VM; Vendor: JetBrains s.r.o. 
2021-06-04 13:06:40,202 [  21281]  ERROR - pplication.impl.LaterInvocator - OS: Linux 
2021-06-04 13:06:40,202 [  21281]  ERROR - pplication.impl.LaterInvocator - Last Action:  
2021-06-04 13:06:49,348 [  30427]   WARN - l.NotificationGroupManagerImpl - Cannot create notification group: NotificationGroupEPid='Project Configuration', displayType=BALLOON, isLogByDefault=true, toolWindowId='null', icon='null', bundle='messages.AppEngineBundle', key='python.app.engine.notification.group.project.configuration', notificationIds='null', pluginDescriptor=PluginDescriptor(name=com.jetbrains.pycharm.pro.customization, id=com.jetbrains.pycharm.pro.customization, descriptorPath=python-appengine-customization.xml, path=/snap/pycharm-professional/244/plugins/pythonIDE, version=211.7442.45, package=null) 
java.util.MissingResourceException: Can't find bundle for base name messages.AppEngineBundle, locale en_US
[...]
2021-06-04 13:06:50,146 [  31225]  ERROR - nSystem.impl.ActionManagerImpl -  [Plugin: com.jetbrains.pycharm.pro.customization] 
com.intellij.diagnostic.PluginException:  [Plugin: com.jetbrains.pycharm.pro.customization]
[...]
2021-06-04 13:06:50,146 [  31225]  ERROR - nSystem.impl.ActionManagerImpl - PyCharm 2021.1.2  Build #PY-211.7442.45 
2021-06-04 13:06:50,146 [  31225]  ERROR - nSystem.impl.ActionManagerImpl - JDK: 11.0.11; VM: Dynamic Code Evolution 64-Bit Server VM; Vendor: JetBrains s.r.o. 
2021-06-04 13:06:50,146 [  31225]  ERROR - nSystem.impl.ActionManagerImpl - OS: Linux 
2021-06-04 13:06:50,146 [  31225]  ERROR - nSystem.impl.ActionManagerImpl - Last Action:  
2021-06-04 13:06:51,516 [  32595]  ERROR - nSystem.impl.ActionManagerImpl -  [Plugin: com.intellij] 
com.intellij.diagnostic.PluginException:  [Plugin: com.intellij]

【问题讨论】:

【参考方案1】:

同时删除文件夹~/.local/share/JetBrains~/.cache/JetBrains 解决了问题

【讨论】:

以上是关于使用 Snap 重新安装后,启动时出现 PyCharm 错误“插件需要缺少‘Python’的类加载器”的主要内容,如果未能解决你的问题,请参考以下文章

重新启动后尝试连接 TFS 时出现错误

modelsim 启动时出现错误

开机时出现【没有找到libprotobuf.dll,因此这个程序未能启动。重新安装应用程序可能会修复此问题。】

解决Delphi 2010启动时出现cannot create xxxxEditorLineEnds.ttr问题

在 chrome 中加载大图像时出现“Aw Snap”错误

关于elasticsearch安装及搭建集群时候的错误