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

pipx install: ModuleNotFoundError: No module named 'gi' #2054

Closed
lamyergeier opened this issue Mar 22, 2022 · 6 comments
Closed

pipx install: ModuleNotFoundError: No module named 'gi' #2054

lamyergeier opened this issue Mar 22, 2022 · 6 comments

Comments

@lamyergeier
Copy link

lamyergeier commented Mar 22, 2022

Describe the bug

Not running after installation using pipx (On Linux Mint 20.3, based on Ubuntu 20.4)

To Reproduce

$ sudo apt-get install --no-install-recommends -y \
		gir1.2-keybinder-3.0 \
		gir1.2-notify-0.7 \
		gir1.2-vte-2.91 \
		gir1.2-wnck-3.0 \
		libkeybinder-3.0-0 \
		libutempter0 \
		python3 \
		python3-cairo \
		python3-dbus \
		python3-gi \
		python3-setuptools-scm \
		python3-pip \
		libgirepository1.0-dev
$ pipx reinstall guake
uninstalled guake! ✨ 🌟 ✨
  installed package guake 3.8.5, installed using Python 3.8.10
  These apps are now globally available
    - guake
    - guake-toggle
done! ✨ 🌟 ✨
$ guake
Traceback (most recent call last):
  File "/home/nikhil/.local/bin/guake", line 5, in <module>
    from guake.main import exec_main
  File "/home/nikhil/.local/pipx/venvs/guake/lib/python3.8/site-packages/guake/main.py", line 54, in <module>
    from guake.support import print_support
  File "/home/nikhil/.local/pipx/venvs/guake/lib/python3.8/site-packages/guake/support.py", line 5, in <module>
    import gi
ModuleNotFoundError: No module named 'gi'

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.

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

@Davidy22
Copy link
Collaborator

There are some amount of dependencies that Pip won't install, so the pip installation is more for getting the latest Guake than it is for installing Guake the first time. gi should be provided by the repo when you install Guake via your distro's package manager

@lamyergeier
Copy link
Author

lamyergeier commented Mar 23, 2022

@Davidy22 I have installed using pipx and not using pip. In the Installing Guake — Guake 1.0 documentation, it is mentioned that pipx is recommended way to install it. I also used sudo apt install to install all dependencies before, but I am getting same error!

@Davidy22
Copy link
Collaborator

Davidy22 commented Mar 23, 2022

From what I've seen of pipx installs it just guarantees that non-python dependencies fail to link even if they're installed. If you have Guake installed via both pip and apt it may still be running the pipx installed version and you'll need to uninstall the pipx version first. Also may need to amend that documentation or figure out what the original writer's intention was.

@lamyergeier
Copy link
Author

lamyergeier commented Mar 23, 2022

The apt repository version was not up to date, and stopped working, so I uninstalled it and installed using pipx.

@Davidy22
Copy link
Collaborator

Consolidating issues related to #1971, need to figure out why there's multiple cases of pygobject/python-gi not getting installed as deps

@mertemba
Copy link
Contributor

mertemba commented May 3, 2024

In case someone else still wants to install Guake using pipx and finds this page, 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

3 participants