How do I fix PIP3 dependency errors? reddit / selfhosted ---------------------------------------------------------------------- askaway0002 · 2023-12-31 07:14 ``` ***user@server:~$ pip3 install bandcamp-downloader --upgrade*** Defaulting to user installation because normal site-packages is not writeable Requirement already satisfied: bandcamp-downloader in ./.local/lib/python3.10/site-packages (0.0.15) Requirement already satisfied: docopt-ng==0.8.1 in ./.local/lib/python3.10/site-packages (from bandcamp-downloader) (0.8.1) Collecting mutagen==1.46.0 Using cached mutagen-1.46.0-py3-none-any.whl (193 kB) Requirement already satisfied: demjson3==3.0.6 in ./.local/lib/python3.10/site-packages (from bandcamp-downloader) (3.0.6) Requirement already satisfied: unicode-slugify==0.1.5 in /usr/local/lib/python3.10/dist-packages (from bandcamp-downloader) (0.1.5) Requirement already satisfied: requests[socks]==2.31.0 in ./.local/lib/python3.10/site-packages (from bandcamp-downloader) (2.31.0) Requirement already satisfied: chardet==5.1.0 in ./.local/lib/python3.10/site-packages (from bandcamp-downloader) (5.1.0) Collecting beautifulsoup4==4.11.2 Using cached beautifulsoup4-4.11.2-py3-none-any.whl (129 kB) Requirement already satisfied: soupsieve>1.2 in /usr/local/lib/python3.10/dist-packages (from beautifulsoup4==4.11.2->bandcamp-downloader) (2.3.2.post1) Requirement already satisfied: idna=2.5 in /usr/lib/python3/dist- packages (from requests[socks]==2.31.0->bandcamp-downloader) (3.3) Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python3/dist-packages (from requests[socks]==2.31.0->bandcamp-downloader) (2020.6.20) Requirement already satisfied: charset-normalizer=2 in ./.local/lib/python3.10/site-packages (from requests[socks]==2.31.0->bandcamp-downloader) (2.1.1) Requirement already satisfied: urllib3=1.21.1 in ./.local/lib/python3.10/site-packages (from requests[socks]==2.31.0->bandcamp-downloader) (2.1.0) Requirement already satisfied: PySocks!=1.5.7,>=1.5.6 in ./.local/lib/python3.10/site-packages (from requests[socks]==2.31.0->bandcamp-downloader) (1.7.1) Requirement already satisfied: unidecode in /usr/local/lib/python3.10/dist-packages (from unicode- slugify==0.1.5->bandcamp-downloader) (1.3.4) Requirement already satisfied: six in /usr/lib/python3/dist-packages (from unicode-slugify==0.1.5->bandcamp-downloader) (1.16.0) Installing collected packages: mutagen, beautifulsoup4 Attempting uninstall: mutagen Found existing installation: mutagen 1.47.0 Uninstalling mutagen-1.47.0: Successfully uninstalled mutagen-1.47.0 Attempting uninstall: beautifulsoup4 Found existing installation: beautifulsoup4 4.12.2 Uninstalling beautifulsoup4-4.12.2: Successfully uninstalled beautifulsoup4-4.12.2 ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. syncedlyrics 0.7.0 requires beautifulsoup4=4.12.2, but you have beautifulsoup4 4.11.2 which is incompatible. spotdl 4.2.4 requires beautifulsoup4=4.12.2, but you have beautifulsoup4 4.11.2 which is incompatible. spotdl 4.2.4 requires mutagen=1.47.0, but you have mutagen 1.46.0 which is incompatible. Successfully installed beautifulsoup4-4.11.2 mutagen-1.46.0 ``` ---------------------------------------------------------------------- kasalacto · 2023-12-31 07:27 I always install python cli apps [pipx](https://pipx.pypa.io/stable/) when I can ---------------------------------------------------------------------- vermyx · 2023-12-31 07:33 Manually download the two packages in question or download spotdl manually. The issue is that bandcamp-downloader isn't asking for a particular version of beautifulsoup and mutagen, but spotdl has a dependency on particular versions of those packages. ---------------------------------------------------------------------- apnorton · 2023-12-31 07:51 Some general advice for working with python packages is: 1. Never modify the system installation of python 2. Use [virtual environments](https://docs.python.org/3/library/venv.html) (or the [conda equivalent](https://conda.io/projects/conda/en/latest/user- guide/tasks/manage-environments.html#) if you're using conda) or [containers](https://www.docker.com/) to separate dependencies for projects. [pipx](https://github.com/pypa/pipx) is a good alternative for if you're installing a whole application via pip (as opposed to a library you're using in your own project). This particular error is happening because `bandcamp-downloader` has `beautifulsoup4==4.11.1` as [a specific dependency version](https://github.com/iheanyi/bandcamp- dl/blob/master/requirements.txt#L3C1-L3C23) and spotdl and syncedlyrics requires a newer version of beautifulsoup (i.e. a version `>=4.12.2`). If bandcamp-downloader and spotdl/syncedlyrics are part of separate projects/could be separated into their own virtual environments or installed with pipx, that would resolve this issue. If that's not possible, I've [seen people suggest](https://www.reddit.com/r/Python/c omments/ua2a7k/how_do_you_manage_conflicting_packages_in_your/) that these kinds of dependency conflicts can be resolved with poetry or pip-tools, but I'm not familiar with the details.