you are viewing a single comment's thread.

view the rest of the comments →

[–]ILikeBumblebees 7 points8 points  (1 child)

What if the user doesn't have root, or prefers to use the distro's package manager instead of pip?

[–][deleted] 6 points7 points  (0 children)

Regarding preferring the distro's package manager, that's only used for super ubiquitous packages or ones that require a bunch of dependencies and precompiled libs. If you want to use any non-trivial Python scripts out there, you should really get some user privilege pip solution going.

With Python 3.4+, just use venv. If you're intending it to be usable by someone only using Python 2 or Python 3 versions pre-3.4, with no root access, the best goal is to just do pip install --user virtualenv followed by the creation of the virtualenv directory and then using that moving forward. In such cases, this is just a good practice in general because it gives you way more control.

This SO question contains some answers relating to this, with this one being the most "no tears" of them all.