我试图在ubuntu 14.04LTS上的gedit 3.10.4中添加一些插件,当我试图在gedit中激活这些插件时出现了一些错误:
(gedit:20686): libpeas-WARNING **: Error initializing Python Plugin Loader: PyGObject initialization failed ImportError: could not import gobject (error was: ImportError("No module named 'gi'",))
(gedit:20686): libpeas-WARNING **: Please check the installation of all the Python related packages required by libpeas and try again
(gedit:20686): libpeas-WARNING **: Loader 'python3' is not a valid PeasPluginLoader instance
(gedit:20686): libpeas-WARNING **: Could not find loader 'python3' for plugin 'bracketcompletion'
我知道了,在ged上
plugin loader 'python3' was not found
有人知道问题从何而来吗?在
我在另一个插件(reST)上也出现了同样的错误。导致这个错误的问题是,当一个virtual environment处于活动状态时,我从命令行运行它。因此Python3没有使用(并找到)系统库。在
解决方案:我从GUI正常运行gedit(或者在终端中停用virtualenv之后),编辑器和插件加载得很好。再次检查是否有类似的原因。在
否则,您可能真的需要检查错误消息中的内容:是否安装了libpeas所需的所有“相关包”。有关信任,请参阅包libpeas-1.0-0的详细信息。在
这是一个gedit错误,请参见https://bugs.launchpad.net/ubuntu/+source/gedit/+bug/859089
作为解决方法,在
/usr/lib/gedit/plugin
中搜索插件文件(例如bracketcompletion.plugin
),并将Loader=python3
更改为Loader=python
不幸的是,这个解决方法doesn't work for all the plugins。在
添加到@Railslide的答案:
在
/usr/lib/gedit/plugin
中搜索插件文件(例如bracketcompletion.plugin
),并将Loader=python3
更改为Loader=python
如果仍然返回错误-可能是因为它与} ,如下所示:
python3
不匹配语法:使用命令^{例如,对于
^{pr2}$gedit-latex-plugin
。。。在然后通过将
python2.x
代码替换为python3
代码来修复插件相关
相关问题 更多 >
编程相关推荐