1

I was trying to upgrade pip and in some examples, I saw --user flag as in here indicating python3 -m pip install --user --upgrade pip. I have never used this flag before, and If I use it now, what would it change?

I read this article from the home page of pip documentation. It is still not clear to me, what is the benefit of this?

cancan
  • 131
  • 1
  • 3
  • 11

1 Answers1

0

See the docs:

Alternate installation: the user scheme

This scheme is designed to be the most convenient solution for users that don’t have write permission to the global site-packages directory or don’t want to install into it. It is enabled with a simple option:

python setup.py install --user

As to "good practice", it depends. I personally install everything in virtual environments (using Poetry), so the exact set of packages and versions is reproducible on different machines.

Thomas
  • 174,939
  • 50
  • 355
  • 478