0

I remember reading that pip can be configured to abort if run when you do not have a virtualenv active. I can't find that article but I'd like to set it up to do this.

I couldn't find a clear option in the --help output or from googling.

Daenyth
  • 35,856
  • 13
  • 85
  • 124
  • also possible duplicate of [Global and local python installations, and accidentally running a requirements file outside of virtualenv](http://stackoverflow.com/a/29616164/5205141) – Overclover Aug 27 '15 at 13:29
  • If you don't have that bad habit of running things as root, `pip` will abort by itself when it realizes it does not have the right to change the global filesystem anyway. – spectras Aug 27 '15 at 13:39
  • @spectras If you're on OSX with homebrew running `pip` without sudo has rights to install system packages. – Daenyth Aug 27 '15 at 14:17
  • Oh. You do have a point then. Also that means any user can install any code as a system package. So OSX comes with the bad habit built-in. Great, another good reason not to use it. Alright, I guess you have to make do with that then. I believe you found the answers you needed in Asagen's link? – spectras Aug 27 '15 at 14:39
  • 1
    @spectras Homebrew doesn't come with OSX, it's intended for single user systems. On a server you'd probably configure it to work differently. – Daenyth Aug 27 '15 at 15:06
  • Ok, I was wrong then. Thanks for the clarification. – spectras Aug 27 '15 at 17:18

0 Answers0