nwg-piotr / nwg-displays

Output management utility for sway and Hyprland.
MIT License
334 stars 22 forks source link

[ERROR] ModuleNotFoundError: No module named 'gi' #45

Open MathisLec opened 5 months ago

MathisLec commented 5 months ago

Hello there, I just installed nwg-displays on my Arch by launching install.sh. When I try to launch the tool, I receive an error:

❯ nwg-displays
Traceback (most recent call last):
  File "/home/<user>/.venv/bin/nwg-displays", line 33, in <module>
    sys.exit(load_entry_point('nwg-displays==0.3.10', 'gui_scripts', 'nwg-displays')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/<user>/.venv/bin/nwg-displays", line 25, in importlib_load_entry_point
    return next(matches).load()
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 202, in load
    module = import_module(match.group('module'))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/<user>/.venv/lib/python3.11/site-packages/nwg_displays-0.3.10-py3.11.egg/nwg_displays/main.py", line 20, in <module>
    import gi
ModuleNotFoundError: No module named 'gi'

I tried to install all of these but no change. Can I get a little help? :)

nwg-piotr commented 5 months ago

Never use pip on Arch. We have packages for all python modules.

nwg-piotr commented 5 months ago

Also nwg-displays itself you can install from AUR, together with all dependencies.

MathisLec commented 5 months ago

Thanks for your answer, I installed nwg-displays from AUR and get this error. I did'nt use pip to. What do you recommend?

nwg-piotr commented 5 months ago

You messed something with your python environment. See the error you pasted.

MathisLec commented 5 months ago

I did'nt get why I never have to use pip in Arch. I tried AUR installation with and without my venv but no change. Sorry I'm not so comfortable with python project management.

nwg-piotr commented 5 months ago

I'm afraid I can't help. Try searching Arch wiki.

Mieluoxxx commented 3 weeks ago

my solution is there