0

I tried to install several python nautilus extensions (i.e. nautilus-columns, nautilus-open-as-root,... ) without any success. Installation goes fine, but nothing shows up in nautilus.

Of course, package python-nautilus is already installed:

ii  python-nautilus                                             1.1-8                                               amd64        Python binding for Nautilus components

Digging a little bit, I discovered that nautilus was complaining when starting:

ImportError: could not import gobject (could not find _PyGObject_API object)
(nautilus:18199): Nautilus-Python-WARNING **: pygobject initialization failed
(nautilus:18199): Nautilus-Python-WARNING **: nautilus_python_init_python failed

Looks like an issue with gobject library or something like that.

As I'm running Ubuntu 14.04.5 with python upgraded, may be the issue is there ? Here is an extract of some packages available on my distribution:

ii  libpython-stdlib:amd64                                      2.7.5-5ubuntu3                                      amd64        interactive high-level object-oriented language (default python version)
ii  libpython2.7-stdlib:amd64                                   2.7.6-8ubuntu0.2                                    amd64        Interactive high-level object-oriented language (standard library, version 2.7)
ii  libpython3-stdlib:amd64                                     3.4.0-0ubuntu2                                      amd64        interactive high-level object-oriented language (default python3 version)
ii  libpython3.4-stdlib:amd64                                   3.4.3-1ubuntu1~14.04.4                              amd64        Interactive high-level object-oriented language (standard library, version 3.4)
ii  python                                                      2.7.5-5ubuntu3                                      amd64        interactive high-level object-oriented language (default version)
ii  python-gi                                                   3.12.0-1ubuntu1                                     amd64        Python 2.x bindings for gobject-introspection libraries
ii  python-gobject                                              3.12.0-1ubuntu1                                     all          Python 2.x bindings for GObject - transitional package
ii  python-gobject-2                                            2.28.6-12build1                                     amd64        deprecated static Python bindings for the GObject library
ii  python2.7                                                   2.7.6-8ubuntu0.2                                    amd64        Interactive high-level object-oriented language (version 2.7)
ii  python3                                                     3.4.0-0ubuntu2                                      amd64        interactive high-level object-oriented language (default python3 version)
ii  python3-gi                                                  3.12.0-1ubuntu1                                     amd64        Python 3 bindings for gobject-introspection libraries
ii  python3.4                                                   3.4.3-1ubuntu1~14.04.4                              amd64        Interactive high-level object-oriented language (version 3.4)

What made me question python version / gobject / v2.7 and v3.4, is also that python-nautilus README file says:

libautilus-extension Python bindings
====================================

These are unstable bindings for the nautilus extension library
introduced in Gnome 2.6.

For examples and documentation check the examples sub directory.

As of nautilus-python 0.7.0, scripts are also loaded from $XDG_DATA_DIR/nautilus-python/extensions,
which includes ~/.local/share and /usr/share (or whatever your $XDG_DATA_DIR is 
set to).

Try to copy test.py to that directory for an example

Requirements
============

Nautilus  2.32.0
Python    2.3
PyGObject 2.28.0

Problems
========
It's currently not possible to reload the python file without
restarting nautilus. That's a planned feature for future versions

=> looks very old, isn't it ?

Latest version of this package seems to be 0.7.3 (2011-03-08). That could explain some compatibility issues with Python 3.4 ? (link to project log)

If yes, how can we proceed to be able to use python extensions for nautilus anyway ? Is there another package to install ? Or can we modify something in this one ?

Any suggestion ?

Thanks !

Thierry
  • 961

0 Answers0