AUR package with Python dependencies

I prefer to always keep the system wide Python as clean as possible; I always use a virtual environment for my Python projects. That way I can install whatever Python packages from PyPi in an isolated environment.

python -m venv test_env
source test_env/bin/activate

How about when a package on AUR that has some Python dependencies? Example:

I assume when installing this package, it will install the Python dependencies in the system wide Python? Is there a way of preventing this and keep the system Python “clean”…?

I’m not a python user at all, so please don’t consider this post as the final truth.

I also assume an AUR package could “pollute” your existing python system.
If you uninstall the AUR package, then (at least most of) your previous python system should be returned to the earlier state.

Anyway, I’d use e.g. VirtualBox where the AUR package can be installed without disturbing your host system’s python framework.

If it’s a system package then using system libraries is the “correct” approach.

2 Likes