question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Default to --user

See original GitHub issue

When pip is installed on a system that has an OS Python install there is currently a problem where pip install foo will throw an error because it doesn’t have file permissions. This causes people to instead run sudo pip install foo which globally installs to the system Python. This creates an issue where people are using pip to manage system level packages when they should likely be using the system package manager.

So my intention is that pip should default to --user however there are a few sticking points with this:

  • How does this interact with Windows? Does this make sense there?
  • How does this interact with altinstall’d Pythons? Specially such as are installed with tools like https://github.com/yyuu/pyenv
  • What do we do for when people do invoke pip as root? Installing into /root/.local/ does not seem very useful.
  • What does this mean for get-pip and the pypa install instructions?
  • ~/.local/bin is not on many people’s $PATH, is there anything that can be done about this?
  • --user installs lack precedence to global easy_install’d packages, which can be quite unexpected.

There are a number of issues that are relevant here: #624 #1443 #1153 #1500 #1051

/cc @ncoghlan

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Reactions:158
  • Comments:170 (123 by maintainers)

github_iconTop GitHub Comments

32reactions
ErikBjarecommented, Sep 13, 2018

I’ve dreamed at night of the --user option becoming the default (not kidding), any chance of my dreams coming true anytime soon?

20reactions
pradyunsgcommented, Jun 8, 2016

I think at the very least, for the time-being, pip should just print a friendly message asking the user to run --user if the command fails. While switching it to be the default has it’s benefits, printing a better message shouldn’t be too hard.

It’s a nice “quick-fix” for the problem till we actually move to defaulting to --user.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Changing default user at startup - Microsoft Community
1. Press windows + x · 2. Select control panel · 3. Select user account · 4. Select Manage user account · 5....
Read more >
How To Change Default User At Startup in Windows 10 / 11
If you have only one user , then go to Settings > Accounts > Family & Other users and add a local account...
Read more >
How can I configure default settings for new users?
How can I configure default settings for new users? · Start the registry editor (regedt32.exe) · Select the "HKEY_USERS on Local Machine" window...
Read more >
Configure the default user - Product documentation - NetApp
You can configure a default user to use if all other mapping attempts fail for a user, or if you do not want...
Read more >
Configuring the user default settings - Atlassian Documentation
Under User interface (the self-side panel), select Default user preferences to open the User default settings page. Select the Edit default ...
Read more >

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found