-
Notifications
You must be signed in to change notification settings - Fork 578
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
Comments
Hrm, the install from source should have dependencies installation surely, but if it hasn't already done so, run |
Hi. Thanks for the immediate response and sorry by my delay. Too busy week. python3-gi is already the newest version (3.36.0-1). 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 |
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. |
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. |
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? |
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. |
SummaryHere are my attempts at installing Guake.
One thing that might be relevant with 3), I tried using Details on each attemptsudo 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! ✨ 🌟 ✨
ModuleNotFoundError: No module named 'gi' . |
So, install from source and package manager are fine and pip just doesn't work, even with dependencies from the package manager? |
@Davidy22 Yes. The pip and pipx installs fail in the same way, trying to find the Install tipsFor anyone else, if you're trying to get the build install or system install working, here are some tips you can follow:
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
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. |
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... |
I actually found a much easier way to install 3.9.0 on Ubuntu 22.04. Then install the deb manually using apt. And it worked for me. |
@mullenkamp When installing from source, make sure you uninstall all other versions, in particular pip uninstall. |
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. |
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. |
@Davidy22 Could the gschema data files be relocated to somewhere in the user's home directory, like |
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 |
This reverts commit 3230199.
In case someone else still wants to install Guake using pipx, the following fix worked for me: pipx inject guake pygobject pyyaml dbus-python |
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
To Reproduce
On Ubuntu 20.04.3 LTS
Install dependencies, setting up development environment and executing locally:
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.The text was updated successfully, but these errors were encountered: