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

gi not found on Mac #62

Open
BeastyBlacksmith opened this issue Aug 12, 2020 · 8 comments
Open

gi not found on Mac #62

BeastyBlacksmith opened this issue Aug 12, 2020 · 8 comments

Comments

@BeastyBlacksmith
Copy link

After running the install.py script of version 0.5 on MacOS running diffuse gives:

Traceback (most recent call last):
  File "/usr/local/bin/diffuse", line 120, in <module>
    import gi
ModuleNotFoundError: No module named 'gi'
@MightyCreak
Copy link
Owner

You need the PyGObject python package.

From Stackoverflow, it seems that this command should work (with Homebrew):

brew install pygobject3

@BeastyBlacksmith
Copy link
Author

That gives me a GUI window with the following error message

Fehler bei der Analyse der Zeilen 5 von /etc/diffuserc

@MightyCreak
Copy link
Owner

Hmm... that's a problem with OS X.
@dscherger has this bug as well, you can find his fix here: https://github.com/MightyCreak/diffuse/pull/24/files/6b091a205b0e7f8a6b1e84c70f02f75517e4465a#diff-26c7ae75b933d602876ed212cfc3da9b

I couldn't merge it because it would have broken other platforms. That said, I'm hopeful that the future Meson installation system (PR #61) will fix this bug.

@MightyCreak
Copy link
Owner

@BeastyBlacksmith I have merge PR #61 and now Meson is the only way to install Diffuse on your computer. Could you give it a try?

To install Meson with Homebrew:

brew install meson

The install procedure is explained in the README.

@BeastyBlacksmith
Copy link
Author

There was the also the gtk-update-icon-cache missing, so I installed gtk-mac-integration and it built.
Running diffuse gives now:

Traceback (most recent call last):
  File "/usr/local/bin/diffuse", line 8361, in <module>
    diff = Diffuse(rc_dir)
  File "/usr/local/bin/diffuse", line 7416, in __init__
    p0 = default_theme.load_icon_for_scale("document-new", icon_size, scale_factor, 0)
gi.repository.GLib.Error: gtk-icon-theme-error-quark: Symbol »document-new« nicht im Thema Adwaita vorhanden (0)

@MightyCreak
Copy link
Owner

Arf... I knew this day would come... document-new is in the "legacy" directory here on Linux GNOME. Technically it is deprecated, but not obsolete yet as you can see in GNOME documentation, it is still listed in the icon list. But it is also the reason for the warnings at startup (when Diffuse runs well) (issue #55).

This is actually what led me to the Meson build system, so I would be able to use the proper GNOME-way of using resources and the built-in feature in Meson to build them (as seen here: https://gitlab.gnome.org/World/Authenticator/-/blob/master/data/meson.build#L19)

Well, know that I'm working on it! I can't give you an ETA, but knowing that it has become a problem on OSX, it raised its priority.

@MightyCreak MightyCreak changed the title gi not found gi not found on Mac Nov 25, 2021
@chenrui333
Copy link

Yeah, I can confirm brew install pygobject3 works.

@hugoholgersson
Copy link
Contributor

This issue can be closed now that we have better support for macOS.

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

4 participants