Python package management: conda, pip, PPAs... I'm confused

Even ignoring this PPA, you will have Python packages from your distro (e.g. you have apt package “pyfoo” from Ubuntu that is also a pypi package “foo”).

That’s why you should not use a Python package manager, even pip, at the global level / outside of a venv. Because if you did a pip install foo you might end up with conflicts, or at least duplicates of foo in your path. Another Ubuntu package that depends on the specific version of pyfoo might break with your newer foo.

Related, I use direnv to setup my venvs. It’s as simple as putting a text file with one line in the project folder where I want a venv. Then every time I cd into that folder, it will automatically activate the venv, and deactivate when I leave. It’s not just convenient, it helps prevent you from accidentally using pip/conda globally when you intended to do it in a project’s venv

/r/linux4noobs Thread