Wassinger
Wassinger

Reputation: 387

Configure pip to install everything as with --user

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.

Upvotes: 4

Views: 2676

Answers (2)

kojiro
kojiro

Reputation: 77089

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.

Upvotes: 2

chepner
chepner

Reputation: 531055

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

[install]
user = true

Upvotes: 8

Related Questions