Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Pip has that feature now. Put this in your ~/.pip/pip.conf:

  [global]
  require-virtualenv = true
and then you get errors like:

  $ pip install foo
  ERROR: Could not find an activated virtualenv (required).


That's not exactly the same. I might be fine with installing Python packages with pip into my home directory, just not /usr.


My workflow's been to temporary disable that, do the stuff I need, then re-enable it. It's a bit clunky, but I don't install stuff outside a virtualenv frequently enough for it to be a major pain in the neck.


Yeah I use pyenv + virtualenvwrapper and there are a few packages I am fine with having in the top-level pyenv version, rather than in any particular virtual environment: black, requests, click, etc.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: