Configure pip to install everything as with --user

Viewed 760

Is there a way to make pip install always run as if I gave the --user command? I have to type it every time, especially when copying commands from instructions, and it is tedious to do. I don't really see a good reason to ever install things as root when I can just install with --user.

Configuration is preferred to simple bash alias.

2 Answers

Add user = true to your pip configuration file. Specifically, it would go in the [install] section:

[install]
user = true

An alternative to editing pip.conf: export PIP_USER=true in your environment, such as in your .bashrc.

All the configuration options can also be set in the environment.

Related