yaronzz / Tidal-Media-Downloader

Download 'TIDAL' Music On Windows/Linux/MacOs (PYTHON/C#)
http://doc.yaronzz.com/post/tidal_dl_installation/
Apache License 2.0
3.29k stars 464 forks source link

[BUG]: "externaly-managed-environment" error when using pip3 under ubuntu 23.04 #1073

Open Bloodylizard opened 1 year ago

Bloodylizard commented 1 year ago

Which tool

tidal-dl

Version

2022.10.31.1

Platform

OS: Ubuntu 23.04 x86_64 Kernel: 6.2.12-surface Shell: bash 5.2.15

Describe the bug

When using pip3 to install tidal-dl, as suggested in the documentation, it returns an error:

error: externally-managed-environment.

Solution: using pipx instead of pip3, as suggested by the error-message.

Relevant log output

user@laptop:~$ pip3 install tidal-dl --upgrade
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.

    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.

    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.

    See /usr/share/doc/python3.11/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

user@laptop:~$ pipx install tidal-dl
  installed package tidal-dl 2022.10.31.1, installed using Python 3.11.2
  These apps are now globally available
    - tidal-dl
done! ✨ 🌟 ✨

Add screenshots

No response

omensight commented 1 year ago

This is not a bug, it says your environment is being managed externally, it is a problem on your system.

Bloodylizard commented 1 year ago

This is not a bug, it says your environment is being managed externally, it is a problem on your system.

I know it's not a bug in the program. I would have liked to post it as a notice for the documentation, but there wasn't an option for that. I ran it on a pretty much stock Ubuntu apart from the kernel and the problem only came up after the update to 23.04. That made me think, that the documentation might need to be updated, if it turns out to be a common problem with Ubuntu 23.04.

As you see the fix is as easy as just using pipx instead of pip3.