beetbox / beets

music library manager and MusicBrainz tagger
http://beets.io/
MIT License
12.95k stars 1.82k forks source link

Unresolved Modules with version 2.1.0 #5511

Open gboysko opened 1 week ago

gboysko commented 1 week ago

Unresolved modules with version 2.1.0

Running this command in verbose (-vv) mode:

 beet -vv
user configuration: /home/glenn/.config/beets/config.yaml
data directory: /home/glenn/.config/beets
plugin paths: 
** error loading plugin embedart:
Traceback (most recent call last):
  File "/home/glenn/.local/share/pipx/venvs/beets/lib/python3.12/site-packages/beets/plugins.py", line 268, in load_plugins
    namespace = __import__(modname, None, None)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/glenn/.local/share/pipx/venvs/beets/lib/python3.12/site-packages/beetsplug/embedart.py", line 21, in <module>
    import requests
ModuleNotFoundError: No module named 'requests'

** error loading plugin fetchart:
Traceback (most recent call last):
  File "/home/glenn/.local/share/pipx/venvs/beets/lib/python3.12/site-packages/beets/plugins.py", line 268, in load_plugins
    namespace = __import__(modname, None, None)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/glenn/.local/share/pipx/venvs/beets/lib/python3.12/site-packages/beetsplug/fetchart.py", line 23, in <module>
    import requests
ModuleNotFoundError: No module named 'requests'

** error loading plugin lastgenre:
Traceback (most recent call last):
  File "/home/glenn/.local/share/pipx/venvs/beets/lib/python3.12/site-packages/beets/plugins.py", line 268, in load_plugins
    namespace = __import__(modname, None, None)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/glenn/.local/share/pipx/venvs/beets/lib/python3.12/site-packages/beetsplug/lastgenre/__init__.py", line 29, in <module>
    import pylast
ModuleNotFoundError: No module named 'pylast'

error: replaygain initialization failed: Failed to load GStreamer: python-gi not found

Led to this problem:

$ pipx uninstall beets
$ pipx install beets

Setup

snejus commented 1 week ago

It seems like you have plugins embedart, fetchart, lastgenre and replaygain enabled, however their dependencies are missing. Have you installed beets with extras for each of those plugins? For example see fetchart docs.

In your case the command is probably pipx install beets[embedart,fetchart,pylast,replaygain]

gboysko commented 6 days ago

Thanks, @snejus. I had not installed those plugins. I was following the FAQ's instructions on installation, but didn't notice that. I uninstalled, then installed again using this command:

$ pipx install beets beets[embedart,fetchart,pylast,replaygain] --force
Installing to existing venv 'beets'
  installed package beets 2.1.0, installed using Python 3.12.7
  These apps are now globally available
    - beet
done! ✨ 🌟 ✨
Installing to existing venv 'beets'
Fatal error from pip prevented installation. Full pip output in file:
    /home/glenn/.local/state/pipx/log/cmd_2024-11-22_15.01.37_pip_errors.log

pip seemed to fail to build package:
    PyGObject

Some possibly relevant errors from pip install:
    error: subprocess-exited-with-error
    ../meson.build:1:0: ERROR: Compiler cc cannot compile programs.
    error: metadata-generation-failed

⚠️  Not removing existing venv /home/glenn/.local/share/pipx/venvs/beets
    because it was not created in this session
Error installing beets from spec 'beets[embedart,fetchart,pylast,replaygain]'.

Not sure how to resolve PyGObject.

snejus commented 6 days ago

See replaygain docs.

It seems like GStreamer is missing from your system. Have you been using replaygain previously or did you only enable it now? If your current configuration was in place before the update, I expected system dependencies to be present already!

gboysko commented 5 days ago

I had used replaygain previously. I'm not sure how it was lost. I will try to resolve all of the various dependencies. Even after installing python3-gi, I'm still unable to install due to an unresolved dependency of PyGObject. I'll keep digging...

snejus commented 3 days ago

What sort of system are you using? It seems like system dependencies are missing, for example on Ubuntu you'd want to install

sudo apt update
sudo apt install ffmpeg gobject-introspection libgirepository1.0-dev
gboysko commented 2 days ago

I'm using Ubuntu 24. Is this information already in your docs?

On Tue, Nov 26, 2024, 5:18 AM Šarūnas Nejus @.***> wrote:

What sort of system are you using? It seems like system dependencies are missing, for example on Ubuntu you'd want to install

sudo apt update sudo apt install ffmpeg gobject-introspection libgirepository1.0-dev

— Reply to this email directly, view it on GitHub https://github.com/beetbox/beets/issues/5511#issuecomment-2500216432, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAE3OMMALDKUHEAMUERZGRL2CRDIFAVCNFSM6AAAAABSIPZ3YCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMBQGIYTMNBTGI . You are receiving this because you authored the thread.Message ID: @.***>

gboysko commented 2 days ago

Sorry no luck, even after installing dependencies.

$ sudo apt update
[OUTPUT omitted--all success]

$ sudo apt install ffmpeg gobject-introspection libgirepository1.0-dev
ffmpeg is already the newest version (7:7.0.2-3ubuntu1).
ffmpeg set to manually installed.
gobject-introspection is already the newest version (1.80.1-4).
gobject-introspection set to manually installed.
libgirepository1.0-dev is already the newest version (1.80.1-4).
Summary:
  Upgrading: 0, Installing: 0, Removing: 0, Not Upgrading: 27

$ pipx install beets[embedart,fetchart,lastgenre,scrub,replaygain] --force
Fatal error from pip prevented installation. Full pip output in file:
    /home/glenn/.local/state/pipx/log/cmd_2024-11-26_15.41.03_pip_errors.log

pip seemed to fail to build package:
    PyGObject

Some possibly relevant errors from pip install:
    error: subprocess-exited-with-error
    ../meson.build:1:0: ERROR: Compiler cc cannot compile programs.
    error: metadata-generation-failed

Error installing beets from spec 'beets[embedart,fetchart,lastgenre,replaygain,scrub]'.

Not sure what else I can do. I was able to use the prior version of beets, fwiw.

gboysko commented 2 days ago

I'm including the error log file.

cmd_2024-11-26_15.41.03_pip_errors.log

The file indicates failures to compile?

snejus commented 1 day ago

Is replaygain working fine with the old version? Could you run pipx runpip beets list and show me the list of packages installed in this environment?

snejus commented 1 day ago

See this: https://www.perplexity.ai/search/system-dependencies-for-pygobj-Uijl8uXyTROBu1U06vREFQ#1