Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

At local execution of guake (without system-wide install), at start up, it break showing that cant found module named 'gi' #1971

Open
jcfstabile opened this issue Nov 11, 2021 · 17 comments

Comments

@jcfstabile
Copy link
Contributor

Be sure to check the existing issues (both open and closed!), and make sure you are running the latest version of Guake.

For how to run the latest Guake in your computer, please refer to Install from source.

Describe the bug

At local execution of guake (without system-wide install), at start up, it break showing that cant found module named 'gi'

Expected behavior

Guake start up and work

Actual behavior

rm -f /home/a/U/PSL/TP/guake/guake/data/gschemas.compiled
glib-compile-schemas --strict /home/a/U/PSL/TP/guake/guake/data
PIPENV_IGNORE_VIRTUALENVS=1 pipenv run ./scripts/run-local.sh
execute Guake GTK3 for developer.
Disabled global site-packages
Traceback (most recent call last):
  File "guake/main.py", line 49, in <module>
    from guake.support import print_support
  File "/home/a/U/PSL/TP/guake/guake/support.py", line 5, in <module>
    import gi
ModuleNotFoundError: No module named 'gi'
Done

To Reproduce

On Ubuntu 20.04.3 LTS
Install dependencies, setting up development environment and executing locally:

$ ./scripts/bootstrap-dev-debian.sh
$ make dev
$ sudo make install-schemas
$ make run

Please run $ guake --support, and paste the results here. Don't put backticks (`) around it! The output already contains Markdown formatting. And make sure you run the command OUTSIDE the Guake.

@Davidy22
Copy link
Collaborator

Hrm, the install from source should have dependencies installation surely, but if it hasn't already done so, run sudo apt-get install python3-gi and you should have gi. May also need pip install PyGObject

@jcfstabile
Copy link
Contributor Author

jcfstabile commented Nov 18, 2021

Hi. Thanks for the immediate response and sorry by my delay. Too busy week.
What you suggest to install is already installed, how is showed by running ./scripts/bootstrap-dev-debian.sh and pip install PyGObject (full output at end of msg).

python3-gi is already the newest version (3.36.0-1).
Requirement already satisfied: PyGObject in /usr/lib/python3/dist-packages (3.36.0)

Aditionaly I have follow the recommendations of this post: https://askubuntu.com/a/1045213, with no success. And one caveat, trying to install vext/vext.gi I got another exception as shown at end of message.

Any advice about what path follow to found the root of this problem? (I was willing to make a first little contribution with issue #1719)

full-output-about-python3-gi-PyGObject.txt
full-output-of-vext-vext.gi-install.txt

@Davidy22
Copy link
Collaborator

Here's pygobject's docs on installing them, see if this helps. If it does, we might have some amendments to make to the debian bootstrap file.

@jcfstabile
Copy link
Contributor Author

I ran the hello.py ,mentioned on pygobject's docs,  without problems and no need to install a thing. Good. The installation of dependencies seems to be ok.

Knowing that, after much investigation found that adding /usr/lib/python3/dist-packages (where there is installed python3-gi on my system) to the PYTHONPATH on file scripts/run-local.sh guake run as expected.

While wait for your feedback Im keep searching and thinking the logic on that.

@Davidy22
Copy link
Collaborator

Hrm, how did the hello.py script run fine but the run-local.sh file needed modification? Well, if you had a change that worked for you then a pull request is welcome, unless it's just a fix when running that specific file?

jcfstabile added a commit to jcfstabile/guake that referenced this issue Dec 15, 2021
@jcfstabile
Copy link
Contributor Author

jcfstabile commented Dec 15, 2021

Hi. As you point, the change I made to run-local.sh was just a fix to run that file. I realize that the pretended change made by pew toggleglobalsitepackages has no real effect: guake/main.py never got the global site packages path on sys.path.

Later found that pipenv was not making system packages available on the virtualenvironment. Confirmed that to behave this way pipenv need --site-packages flag on creation.

After seeing pypa/pipenv#3352 , on Dec 8, 2018,  and we were using pipenv=2018.11.26, I changed the pipenv version to 2021.11.23 (latest at the moment). That fix the issue, so, I made a PR: #1989 changing pipenv version and adding --site-packages flag on pipenv-install-dev Makefile's rule.

@nmay231
Copy link

nmay231 commented Aug 18, 2022

Summary

Here are my attempts at installing Guake.

  1. Installing through system package manager (for Ubuntu 22.04). It works, but installs version 3.8.5 which has the bug Tab names lost after restart #2105 .
  2. Installing with pip. Has the same issue as Errors thrown on Ubuntu 22.04 when installing version 3.[89].x via pip/pipx #2100 where the file lib/python3.10/site-packages/guake/data/gschemas.compiled is not found.
  3. Installing with pipx. Fails to import gi (same as Errors thrown on Ubuntu 22.04 when installing version 3.[89].x via pip/pipx #2100 and this issue). However, with some tinkering, it is possible to install pygobject but then it fails on trying to import yaml (pyyaml). Installing that, it fails on dbus, which I didn't know how to install.
  4. Installing from source. Same issue as 2).

One thing that might be relevant with 3), I tried using pipx install --system-site-packages and then apt install'ing the packages from the docs, but it didn't find the gi package still. I use pyenv to manage my versions of python and I wonder if that might be messing with --system-site-packages.

Details on each attempt

sudo apt install guake
guake

That's it. It worked, but has the bug mentioned earlier.

Install with pip directly.

sudo apt install gir1.2-keybinder-3.0 gir1.2-notify-0.7 gir1.2-vte-2.91 libkeybinder-3.0-0 libutempter0 python3-setuptools python3-cairo python3-dbus python3-gi
/usr/bin/python3 -m pip install guake
guake # Missing file error (listed in full below)

Install with pipx.

% pipx install --python ~/.asdf/shims/python3.10 --verbose guake
pipx >(setup:757): pipx version is 1.1.0
pipx >(setup:758): Default python interpreter is '/home/nmay/.asdf/installs/python/3.10.6/bin/python'
pipx >(package_name_from_spec:323): Determined package name: guake
pipx >(package_name_from_spec:324): Package name determined in 0.0s
creating virtual environment...
pipx >(run_subprocess:173): running /home/nmay/.asdf/shims/python3.10 -m venv --without-pip /home/nmay/.local/pipx/venvs/guake
pipx >(run_subprocess:173): running /home/nmay/.local/pipx/venvs/guake/bin/python -c import sysconfig; print(sysconfig.get_path('purelib'))
pipx >(run_subprocess:173): running /home/nmay/.local/pipx/shared/bin/python -c import sysconfig; print(sysconfig.get_path('purelib'))
pipx >(run_subprocess:173): running /home/nmay/.local/pipx/venvs/guake/bin/python --version
pipx >(_parsed_package_to_package_or_url:128): cleaned package spec: guake
installing guake...
pipx >(run_subprocess:173): running /home/nmay/.local/pipx/venvs/guake/bin/python -m pip install guake
pipx >(run_subprocess:173): running <fetch_info_in_venv commands>
pipx >(get_venv_metadata_for_package:303): get_venv_metadata_for_package: 28ms
pipx >(_parsed_package_to_package_or_url:128): cleaned package spec: guake
pipx >(needs_upgrade:69): Time since last upgrade of shared libs, in seconds: 6186. Upgrade will be run by pipx if greater than 2592000.
  installed package guake 3.9.0, installed using Python 3.10.6
  These apps are now globally available
    - guake
    - guake-toggle
done! ✨ 🌟 ✨

However, running guake produces ModuleNotFoundError: No module named 'gi'.

% guake
Traceback (most recent call last):
  File "/home/nmay/.local/bin/guake", line 5, in <module>
    from guake.main import exec_main
  File "/home/nmay/.local/pipx/venvs/guake/lib/python3.10/site-packages/guake/main.py", line 54, in <module>
    from guake.support import print_support
  File "/home/nmay/.local/pipx/venvs/guake/lib/python3.10/site-packages/guake/support.py", line 5, in <module>
    import gi
ModuleNotFoundError: No module named 'gi'

I then tried to manually install/inject pygobject into guake's virtual environment. It was having issues installing because pkg-config couldn't find cairo.pc. Here's how I fixed that.

pipx inject --verbose guake pygobject # Fails because `pkg-config` couldn't find `cairo.pc`

sudo apt install libcairo2-dev
pkg-config --atleast-version=1.12.0 cairo; echo $? # Still can't find cairo.pc (error code 1)

sudo find / -iname cairo.pc # Find the file manually and ...
export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig:$PKG_CONFIG_PATH # temporarily add it

pkg-config --atleast-version=1.12.0 cairo; echo $? # Now it finds the file (error code 0)
pipx inject --verbose guake pygobject # Now it succeeds install pygobject...
guake # But now it can't import `yaml`...

Installing from source gives basically the same missing file error as 2).

% cd gauke; make reinstall
sudo make uninstall && make && sudo make install && //usr/local/bin/guake
rm -f "//usr/local/share/applications/guake.desktop"
rm -f "//usr/local/share/applications/guake-prefs.desktop"
rm -f "//usr/local/share/metainfo/guake.desktop.metainfo.xml"
rm -f "//usr/local/share/pixmaps/guake.png"
rm -fr "//usr/local/share/guake/pixmaps"
rm -fr "//usr/local/share/guake"
rm -f "//usr/local/share/glib-2.0/schemas/org.guake.gschema.xml"
rm -f "//usr/local/share/glib-2.0/schemas/gschemas.compiled"
find //usr/local/share/locale/ -name "guake.mo" -exec rm -f "{}" + || :
# prune two levels of empty locale/ subdirs
find "//usr/local/share/locale" -type d -a -empty -exec rmdir "{}" + || :
find "//usr/local/share/locale" -type d -a -empty -exec rmdir "{}" + || :
/bin/sh -c "env PREFIX=/usr/local python3 scripts/all-sitedirs-in-prefix.py" \
	| while read sitedir; do \
		echo "rm -rf /$sitedir/{guake,guake-*.egg-info}"; \
		rm -rf /$sitedir/guake; \
		rm -rf /$sitedir/guake-*.egg-info; \
	done
rm -rf //usr/local/local/lib/python3.10/dist-packages/{guake,guake-*.egg-info}
rm -rf //usr/local/lib/python3/dist-packages/{guake,guake-*.egg-info}
rm -rf //usr/local/lib/python3.10/dist-packages/{guake,guake-*.egg-info}
rm -f "//usr/local/bin/guake"
rm -f "//usr/local/bin/guake-prefs"
rm -f "//usr/local/bin/guake-toggle"
make[1]: Entering directory '/home/nmay/.build-dirs/guake'
generating desktop files
Generating path.py...
generating po/gl.po
generating po/de.po
generating po/el.po
generating po/ja.po
generating po/tr.po
generating po/nb.po
generating po/hu.po
generating po/pl.po
generating po/fi.po
generating po/es.po
generating po/uk.po
generating po/ru.po
generating po/hr.po
generating po/fr.po
generating po/zh_TW.po
generating po/cs.po
generating po/it.po
generating po/nl.po
generating po/fa.po
generating po/sv.po
generating po/id.po
generating po/pa.po
generating po/ca.po
generating po/zh_CN.po
generating po/ko.po
generating po/pt_BR.po
rm -f /home/nmay/.build-dirs/guake/guake/data/gschemas.compiled
glib-compile-schemas --strict /home/nmay/.build-dirs/guake/guake/data
# 'make' target, so users can install guake without need to install the 'dev' dependencies
make[1]: Leaving directory '/home/nmay/.build-dirs/guake'
install -dm755                                       "//usr/local/share/applications"
install -Dm644 "/home/nmay/.build-dirs/guake/guake/data/guake.desktop"       "//usr/local/share/applications/"
install -Dm644 "/home/nmay/.build-dirs/guake/guake/data/guake-prefs.desktop" "//usr/local/share/applications/"
install -dm755                                       "//usr/local/share/metainfo/"
install -Dm644 "/home/nmay/.build-dirs/guake/guake/data/guake.desktop.metainfo.xml"  "//usr/local/share/metainfo/"
install -dm755                                 "//usr/local/share/guake/pixmaps"
install -Dm644 "/home/nmay/.build-dirs/guake/guake/data"/pixmaps/*.png "//usr/local/share/guake/pixmaps/"
install -Dm644 "/home/nmay/.build-dirs/guake/guake/data"/pixmaps/*.svg "//usr/local/share/guake/pixmaps/"
install -dm755                                     "//usr/local/share/pixmaps"
install -Dm644 "/home/nmay/.build-dirs/guake/guake/data/pixmaps/guake.png" "//usr/local/share/pixmaps/"
install -dm755                                           "//usr/local/share/guake"
install -Dm644 "/home/nmay/.build-dirs/guake/guake/data/autostart-guake.desktop" "//usr/local/share/guake/"
install -dm755                           "//usr/local/share/guake"
install -Dm644 "/home/nmay/.build-dirs/guake/guake/data"/*.glade "//usr/local/share/guake/"
install -dm755                                         "//usr/local/share/glib-2.0/schemas"
install -Dm644 "/home/nmay/.build-dirs/guake/guake/data/org.guake.gschema.xml" "//usr/local/share/glib-2.0/schemas/"
if [ 1 = 1 ]; then glib-compile-schemas //usr/local/share/glib-2.0/schemas; fi
for f in $(find po -iname "*.mo"); do \
	l="${f%%.*}"; \
	lb=$(basename $l); \
	install -Dm644 "$f" "//usr/local/share/locale/$lb/LC_MESSAGES/guake.mo"; \
done;
# you probably want to execute this target with sudo:
# sudo make install
#############################################################

Installing from source on your system is not recommended.
Please prefer you application package manager (apt, yum, ...)

#############################################################
/bin/sh: 1: python: not found
/bin/sh: 1: [: -eq: unexpected operator
Processing /home/nmay/.build-dirs/guake
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: guake
  Building wheel for guake (pyproject.toml) ... done
  Created wheel for guake: filename=guake-3.9.1.dev12-py2.py3-none-any.whl size=811029 sha256=f41a191e1f977c34617b7af5fe302386797d419c23df7618f8c558ac5e52686b
  Stored in directory: /tmp/pip-ephem-wheel-cache-565f9m_e/wheels/9a/05/c9/5e87b6d3394363080bfae896af57a1d34b985bc786c6611e6e
Successfully built guake
Installing collected packages: guake
  Attempting uninstall: guake
    Found existing installation: guake 3.9.1.dev12
    Uninstalling guake-3.9.1.dev12:
      Successfully uninstalled guake-3.9.1.dev12
Successfully installed guake-3.9.1.dev12
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
removed directory 'build/bdist.linux-x86_64'
removed 'build/lib/guake/gsettings.py'
removed 'build/lib/guake/guake_toggle.py'
removed 'build/lib/guake/_version.py'
removed 'build/lib/guake/about.py'
removed 'build/lib/guake/palettes.py'
removed 'build/lib/guake/terminal.py'
removed 'build/lib/guake/settings.py'
removed 'build/lib/guake/globals.py'
removed 'build/lib/guake/common.py'
removed 'build/lib/guake/theme.py'
removed 'build/lib/guake/split_utils.py'
removed 'build/lib/guake/support.py'
removed 'build/lib/guake/menus.py'
removed 'build/lib/guake/paths.py'
removed 'build/lib/guake/boxes.py'
removed 'build/lib/guake/notebook.py'
removed 'build/lib/guake/utils.py'
removed 'build/lib/guake/dialogs.py'
removed 'build/lib/guake/callbacks.py'
removed 'build/lib/guake/main.py'
removed 'build/lib/guake/guake_app.py'
removed 'build/lib/guake/__init__.py'
removed 'build/lib/guake/data/autostart-guake.desktop'
removed 'build/lib/guake/data/guake-prefs.template.desktop'
removed 'build/lib/guake/data/guake.desktop.metainfo.xml'
removed 'build/lib/guake/data/about.glade'
removed 'build/lib/guake/data/prefs.glade'
removed 'build/lib/guake/data/org.guake.gschema.xml'
removed 'build/lib/guake/data/search.glade'
removed 'build/lib/guake/data/guake.template.desktop'
removed 'build/lib/guake/data/__init__.py'
removed 'build/lib/guake/data/guake.glade'
removed 'build/lib/guake/data/pixmaps/screenshot-fullscreen.jpg'
removed 'build/lib/guake/data/pixmaps/guake-notification.png'
removed 'build/lib/guake/data/pixmaps/quick-open.png'
removed 'build/lib/guake/data/pixmaps/intro-large.jpg'
removed 'build/lib/guake/data/pixmaps/screenshot-small.jpg'
removed 'build/lib/guake/data/pixmaps/add_tab.png'
removed 'build/lib/guake/data/pixmaps/guake-48.png'
removed 'build/lib/guake/data/pixmaps/guake-tray.svg'
removed 'build/lib/guake/data/pixmaps/quick-open-selection.png'
removed 'build/lib/guake/data/pixmaps/guake-64.png'
removed 'build/lib/guake/data/pixmaps/intro-medium.jpg'
removed 'build/lib/guake/data/pixmaps/guake.png'
removed 'build/lib/guake/data/pixmaps/guake-128.png'
removed 'build/lib/guake/data/pixmaps/guake-tray.png'
removed 'build/lib/guake/data/pixmaps/intro-small.jpg'
removed 'build/lib/guake/data/pixmaps/quick-open-python-exception.png'
removed directory 'build/lib/guake/data/pixmaps'
removed directory 'build/lib/guake/data'
removed 'build/lib/guake/dbusiface.py'
removed 'build/lib/guake/guake_logging.py'
removed 'build/lib/guake/simplegladeapp.py'
removed 'build/lib/guake/keybindings.py'
removed 'build/lib/guake/customcommands.py'
removed 'build/lib/guake/prefs.py'
removed 'build/lib/guake/notifier.py'
removed directory 'build/lib/guake'
removed directory 'build/lib'
removed directory 'build'
removed 'guake.egg-info/entry_points.txt'
removed 'guake.egg-info/requires.txt'
removed 'guake.egg-info/PKG-INFO'
removed 'guake.egg-info/SOURCES.txt'
removed 'guake.egg-info/dependency_links.txt'
removed 'guake.egg-info/top_level.txt'
removed directory 'guake.egg-info'
Guake not running, starting it
Loading Gnome schema from: /home/nmay/.local/lib/python3.10/site-packages/guake/data
Unable to load the GLib schema, try to compile it
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 177, in activate_name_owner
    return self.get_name_owner(bus_name)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 361, in get_name_owner
    return self.call_blocking(BUS_DAEMON_NAME, BUS_DAEMON_PATH,
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.guake3.RemoteControl': no such name

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/nmay/.local/lib/python3.10/site-packages/guake/main.py", line 463, in main
    remote_object = bus.get_object(DBUS_NAME, DBUS_PATH)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 241, in get_object
    return self.ProxyObjectClass(self, bus_name, object_path,
  File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 250, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 182, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 277, in start_service_by_name
    return (True, self.call_blocking(BUS_DAEMON_NAME, BUS_DAEMON_PATH,
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.guake3.RemoteControl was not provided by any .service files

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/nmay/.local/lib/python3.10/site-packages/guake/guake_app.py", line 113, in __init__
    schema_source = load_schema()
  File "/home/nmay/.local/lib/python3.10/site-packages/guake/guake_app.py", line 108, in load_schema
    return Gio.SettingsSchemaSource.new_from_directory(
gi.repository.GLib.GError: g-file-error-quark: Failed to open file “/home/nmay/.local/lib/python3.10/site-packages/guake/data/gschemas.compiled”: open() failed: No such file or directory (4)
Compiling schema: /home/nmay/.local/lib/python3.10/site-packages/guake/data
No schema files found: doing nothing.
Loading Gnome schema from: /home/nmay/.local/lib/python3.10/site-packages/guake/data
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 177, in activate_name_owner
    return self.get_name_owner(bus_name)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 361, in get_name_owner
    return self.call_blocking(BUS_DAEMON_NAME, BUS_DAEMON_PATH,
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.guake3.RemoteControl': no such name

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/nmay/.local/lib/python3.10/site-packages/guake/main.py", line 463, in main
    remote_object = bus.get_object(DBUS_NAME, DBUS_PATH)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 241, in get_object
    return self.ProxyObjectClass(self, bus_name, object_path,
  File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 250, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 182, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 277, in start_service_by_name
    return (True, self.call_blocking(BUS_DAEMON_NAME, BUS_DAEMON_PATH,
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.guake3.RemoteControl was not provided by any .service files

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/nmay/.local/lib/python3.10/site-packages/guake/guake_app.py", line 113, in __init__
    schema_source = load_schema()
  File "/home/nmay/.local/lib/python3.10/site-packages/guake/guake_app.py", line 108, in load_schema
    return Gio.SettingsSchemaSource.new_from_directory(
gi.repository.GLib.GError: g-file-error-quark: Failed to open file “/home/nmay/.local/lib/python3.10/site-packages/guake/data/gschemas.compiled”: open() failed: No such file or directory (4)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "//usr/local/bin/guake", line 8, in <module>
    sys.exit(exec_main())
  File "/home/nmay/.local/lib/python3.10/site-packages/guake/main.py", line 633, in exec_main
    if not main():
  File "/home/nmay/.local/lib/python3.10/site-packages/guake/main.py", line 479, in main
    instance = Guake()
  File "/home/nmay/.local/lib/python3.10/site-packages/guake/guake_app.py", line 117, in __init__
    schema_source = load_schema()
  File "/home/nmay/.local/lib/python3.10/site-packages/guake/guake_app.py", line 108, in load_schema
    return Gio.SettingsSchemaSource.new_from_directory(
gi.repository.GLib.GError: g-file-error-quark: Failed to open file “/home/nmay/.local/lib/python3.10/site-packages/guake/data/gschemas.compiled”: open() failed: No such file or directory (4)
make: *** [Makefile:173: reinstall] Error 1

I can't go down this rabbit hole much longer, but I hope that helps find the issue.

EDIT:

I tried reinstall guake using apt and it now will not start because of the missing file error :/ I'm currently stuck without access to guake...

EDIT 2:

Listening to this comment, I uninstalled the pip version of guake (which I thought I had done...), and I can now use the version built from source 4).

My guess is you still have to manually install pygobject after linking to the cairo.pc file, but everything else should work just fine (as long as you uninstall the pip version).

@Davidy22
Copy link
Collaborator

So, install from source and package manager are fine and pip just doesn't work, even with dependencies from the package manager?

@nmay231
Copy link

nmay231 commented Aug 20, 2022

@Davidy22 Yes. The pip and pipx installs fail in the same way, trying to find the gschemas.compiled file(s). (I was sorta wrong in my last comment with pipx)

Install tips

For anyone else, if you're trying to get the build install or system install working, here are some tips you can follow:

  1. Uninstall ALL existing versions of guake. Make sure guake doesn't exist which guake.
  2. Install all of the system packages listed in the docs
  3. If installing with the system package manager sudo apt install guake. It should just work.
  4. If installing from source, first try running make reinstall. You will probably get the Missing gi module error.
  5. To fix missing gi error, follow the steps:
sudo apt install libcairo2-dev # Install system dependencies.
sudo find / -iname cairo.pc # Find cairo.pc manually
export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig:$PKG_CONFIG_PATH # temporarily add it to pkg-config

pkg-config --atleast-version=1.12.0 cairo; echo $? # Verify it can find the file (error code 0)
make reinstall # Install guake from the source directory
  1. If you now get the error Missing yaml module, that means you didn't actually install the system packages or that guake is not running using the system version of python (check the shebang vim $(which guake))

Failed pip and pipx installs

/usr/bin/python3 -m pip install --user guake
guake # missing file error
% guake
Guake not running, starting it
Loading Gnome schema from: /home/nmay/.local/lib/python3.10/site-packages/guake/data
Unable to load the GLib schema, try to compile it
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 177, in activate_name_owner
    return self.get_name_owner(bus_name)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 361, in get_name_owner
    return self.call_blocking(BUS_DAEMON_NAME, BUS_DAEMON_PATH,
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.guake3.RemoteControl': no such name

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/nmay/.local/lib/python3.10/site-packages/guake/main.py", line 473, in main
    remote_object = bus.get_object(DBUS_NAME, DBUS_PATH)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 241, in get_object
    return self.ProxyObjectClass(self, bus_name, object_path,
  File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 250, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 182, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 277, in start_service_by_name
    return (True, self.call_blocking(BUS_DAEMON_NAME, BUS_DAEMON_PATH,
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.guake3.RemoteControl was not provided by any .service files

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/nmay/.local/lib/python3.10/site-packages/guake/guake_app.py", line 111, in __init__
    schema_source = load_schema()
  File "/home/nmay/.local/lib/python3.10/site-packages/guake/guake_app.py", line 106, in load_schema
    return Gio.SettingsSchemaSource.new_from_directory(
gi.repository.GLib.GError: g-file-error-quark: Failed to open file “/home/nmay/.local/lib/python3.10/site-packages/guake/data/gschemas.compiled”: open() failed: No such file or directory (4)
Compiling schema: /home/nmay/.local/lib/python3.10/site-packages/guake/data
Error opening directory “/home/nmay/.local/lib/python3.10/site-packages/guake/data”: No such file or directory
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 177, in activate_name_owner
    return self.get_name_owner(bus_name)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 361, in get_name_owner
    return self.call_blocking(BUS_DAEMON_NAME, BUS_DAEMON_PATH,
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.guake3.RemoteControl': no such name

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/nmay/.local/lib/python3.10/site-packages/guake/main.py", line 473, in main
    remote_object = bus.get_object(DBUS_NAME, DBUS_PATH)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 241, in get_object
    return self.ProxyObjectClass(self, bus_name, object_path,
  File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 250, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 182, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 277, in start_service_by_name
    return (True, self.call_blocking(BUS_DAEMON_NAME, BUS_DAEMON_PATH,
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.guake3.RemoteControl was not provided by any .service files

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/nmay/.local/lib/python3.10/site-packages/guake/guake_app.py", line 111, in __init__
    schema_source = load_schema()
  File "/home/nmay/.local/lib/python3.10/site-packages/guake/guake_app.py", line 106, in load_schema
    return Gio.SettingsSchemaSource.new_from_directory(
gi.repository.GLib.GError: g-file-error-quark: Failed to open file “/home/nmay/.local/lib/python3.10/site-packages/guake/data/gschemas.compiled”: open() failed: No such file or directory (4)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/nmay/.local/bin/guake", line 8, in <module>
    sys.exit(exec_main())
  File "/home/nmay/.local/lib/python3.10/site-packages/guake/main.py", line 648, in exec_main
    if not main():
  File "/home/nmay/.local/lib/python3.10/site-packages/guake/main.py", line 489, in main
    instance = Guake()
  File "/home/nmay/.local/lib/python3.10/site-packages/guake/guake_app.py", line 114, in __init__
    try_to_compile_glib_schemas()
  File "/home/nmay/.local/lib/python3.10/site-packages/guake/paths.py", line 96, in try_to_compile_glib_schemas
    subprocess.check_call(["glib-compile-schemas", "--strict", SCHEMA_DIR])
  File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['glib-compile-schemas', '--strict', '/home/nmay/.local/lib/python3.10/site-packages/guake/data']' returned non-zero exit status 1.
# I was wrong in my last comment. You do NOT need to inject any packages manually, as long as you install system packages and specify the correct python binary.
pipx install --force --system-site-packages --verbose --python /usr/bin/python guake
guake
% pipx install --force --system-site-packages --verbose --python /usr/bin/python guake
pipx >(setup:757): pipx version is 1.1.0
pipx >(setup:758): Default python interpreter is '/home/nmay/.asdf/installs/python/3.10.6/bin/python'
pipx >(package_name_from_spec:323): Determined package name: guake
pipx >(package_name_from_spec:324): Package name determined in 0.0s
creating virtual environment...
pipx >(run_subprocess:173): running /usr/bin/python -m venv --without-pip --system-site-packages /home/nmay/.local/pipx/venvs/guake
pipx >(run_subprocess:173): running /home/nmay/.local/pipx/venvs/guake/bin/python -c import sysconfig; print(sysconfig.get_path('purelib'))
pipx >(run_subprocess:173): running /home/nmay/.local/pipx/shared/bin/python -c import sysconfig; print(sysconfig.get_path('purelib'))
pipx >(run_subprocess:173): running /home/nmay/.local/pipx/venvs/guake/bin/python --version
pipx >(_parsed_package_to_package_or_url:128): cleaned package spec: guake
installing guake...
pipx >(run_subprocess:173): running /home/nmay/.local/pipx/venvs/guake/bin/python -m pip install guake
pipx >(run_subprocess:173): running <fetch_info_in_venv commands>
pipx >(get_venv_metadata_for_package:303): get_venv_metadata_for_package: 29ms
pipx >(_parsed_package_to_package_or_url:128): cleaned package spec: guake
pipx >(_symlink_package_apps:112): Force is true. Removing /home/nmay/.local/bin/guake.
pipx >(_symlink_package_apps:112): Force is true. Removing /home/nmay/.local/bin/guake-toggle.
pipx >(needs_upgrade:69): Time since last upgrade of shared libs, in seconds: 183472. Upgrade will be run by pipx if greater than 2592000.
  installed package guake 3.9.0, installed using Python 3.10.4
  These apps are now globally available
    - guake
    - guake-toggle
done! ✨ 🌟 ✨

% guake                                                                                             <04:24:59 PM>
Guake not running, starting it
Loading Gnome schema from: /home/nmay/.local/pipx/venvs/guake/lib/python3.10/site-packages/guake/data
Unable to load the GLib schema, try to compile it
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 177, in activate_name_owner
    return self.get_name_owner(bus_name)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 361, in get_name_owner
    return self.call_blocking(BUS_DAEMON_NAME, BUS_DAEMON_PATH,
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.guake3.RemoteControl': no such name

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/nmay/.local/pipx/venvs/guake/lib/python3.10/site-packages/guake/main.py", line 473, in main
    remote_object = bus.get_object(DBUS_NAME, DBUS_PATH)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 241, in get_object
    return self.ProxyObjectClass(self, bus_name, object_path,
  File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 250, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 182, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 277, in start_service_by_name
    return (True, self.call_blocking(BUS_DAEMON_NAME, BUS_DAEMON_PATH,
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.guake3.RemoteControl was not provided by any .service files

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/nmay/.local/pipx/venvs/guake/lib/python3.10/site-packages/guake/guake_app.py", line 111, in __init__
    schema_source = load_schema()
  File "/home/nmay/.local/pipx/venvs/guake/lib/python3.10/site-packages/guake/guake_app.py", line 106, in load_schema
    return Gio.SettingsSchemaSource.new_from_directory(
gi.repository.GLib.GError: g-file-error-quark: Failed to open file “/home/nmay/.local/pipx/venvs/guake/lib/python3.10/site-packages/guake/data/gschemas.compiled”: open() failed: No such file or directory (4)
Compiling schema: /home/nmay/.local/pipx/venvs/guake/lib/python3.10/site-packages/guake/data
Error opening directory “/home/nmay/.local/pipx/venvs/guake/lib/python3.10/site-packages/guake/data”: No such file or directory
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 177, in activate_name_owner
    return self.get_name_owner(bus_name)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 361, in get_name_owner
    return self.call_blocking(BUS_DAEMON_NAME, BUS_DAEMON_PATH,
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.guake3.RemoteControl': no such name

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/nmay/.local/pipx/venvs/guake/lib/python3.10/site-packages/guake/main.py", line 473, in main
    remote_object = bus.get_object(DBUS_NAME, DBUS_PATH)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 241, in get_object
    return self.ProxyObjectClass(self, bus_name, object_path,
  File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 250, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 182, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 277, in start_service_by_name
    return (True, self.call_blocking(BUS_DAEMON_NAME, BUS_DAEMON_PATH,
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.guake3.RemoteControl was not provided by any .service files

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/nmay/.local/pipx/venvs/guake/lib/python3.10/site-packages/guake/guake_app.py", line 111, in __init__
    schema_source = load_schema()
  File "/home/nmay/.local/pipx/venvs/guake/lib/python3.10/site-packages/guake/guake_app.py", line 106, in load_schema
    return Gio.SettingsSchemaSource.new_from_directory(
gi.repository.GLib.GError: g-file-error-quark: Failed to open file “/home/nmay/.local/pipx/venvs/guake/lib/python3.10/site-packages/guake/data/gschemas.compiled”: open() failed: No such file or directory (4)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/nmay/.local/bin/guake", line 8, in <module>
    sys.exit(exec_main())
  File "/home/nmay/.local/pipx/venvs/guake/lib/python3.10/site-packages/guake/main.py", line 648, in exec_main
    if not main():
  File "/home/nmay/.local/pipx/venvs/guake/lib/python3.10/site-packages/guake/main.py", line 489, in main
    instance = Guake()
  File "/home/nmay/.local/pipx/venvs/guake/lib/python3.10/site-packages/guake/guake_app.py", line 114, in __init__
    try_to_compile_glib_schemas()
  File "/home/nmay/.local/pipx/venvs/guake/lib/python3.10/site-packages/guake/paths.py", line 96, in try_to_compile_glib_schemas
    subprocess.check_call(["glib-compile-schemas", "--strict", SCHEMA_DIR])
  File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['glib-compile-schemas', '--strict', '/home/nmay/.local/pipx/venvs/guake/lib/python3.10/site-packages/guake/data']' returned non-zero exit status 1.

@mullenkamp
Copy link

Thanks @nmay231. This is exactly the problem that I'm having with guake...but your fix (to install from source) still didn't work for me. It's a really pity that this is so hard...

@mullenkamp
Copy link

mullenkamp commented Oct 14, 2022

I actually found a much easier way to install 3.9.0 on Ubuntu 22.04.
First, install it via the normal apt install guake (so that all the normal dependencies are installed). Then remove guake (apt remove guake).
Download the 3.9.0 version via the newer Ubuntu version:
https://packages.ubuntu.com/kinetic/all/guake/download

Then install the deb manually using apt. And it worked for me.
This is obviously not an ideal option, but when all other options are broken I'm glad this works.

@nmay231
Copy link

nmay231 commented Oct 14, 2022

@mullenkamp When installing from source, make sure you uninstall all other versions, in particular pip uninstall. which guake should be /use/local/bin/guake if I remember correctly (on my phone ATM). Then follow step 5 if you haven't already.

@mullenkamp
Copy link

Yup, I followed your instructions to the letter 😉. But it still didn't work. I appreciate the help though. The deb install worked like a charm, so I'm happy 😉. I really love quake, but I came close to looking elsewhere when I was having such trouble installing the latest version.

@Davidy22
Copy link
Collaborator

Davidy22 commented Oct 14, 2022

I put some amount of effort into fixing the pip build when I came onto the project, but the dependencies on packages that you can't get via pip and half the people using it not being able to reach the non pip dependencies when they're installed has been fairly annoying. Might just fully deprecate the pip build and push on the repo versions more.

@nmay231
Copy link

nmay231 commented Oct 14, 2022

@Davidy22 Could the gschema data files be relocated to somewhere in the user's home directory, like ~/.local/share, instead of being put in site-packages/? I might not be fully understanding the issue, but it seems odd that data files are being stored there.

@Davidy22
Copy link
Collaborator

Mainly the gobjects dependency that a hefty amount of guake is built on that requires gtk related packages that you don't install via pypi that causes 99% of these pip install related issues

PhungXuanAnh pushed a commit to PhungXuanAnh/guake that referenced this issue Oct 28, 2023
PhungXuanAnh pushed a commit to PhungXuanAnh/guake that referenced this issue Oct 28, 2023
@mertemba
Copy link
Contributor

mertemba commented May 3, 2024

In case someone else still wants to install Guake using pipx, the following fix worked for me:

pipx inject guake pygobject pyyaml dbus-python

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants