Lurker News
Back to discussion

Comment by sanderjd

sanderjd1 reply#
Yep, I screw things up all the time with packages in homebrew that are written in python, when I forget to switch into a virtual env before doing stuff with pip. Debian's solution seems very sensible. And it is the same solution as homebrew, I suppose, as long as you don't interact with any of the homebrew-installed packages via pip. But I find it quite easy to accidentally do that.
tech22 replies#

  export PIP_REQUIRE_VIRTUALENV=1
has been quite helpful in the past as pip then refuses to just install things directly.
rlpb#
There is https://peps.python.org/pep-0668/ which suggests that in the future this kind of behaviour will be default. I'm not sure of the specifics but I have seen lots of conversation about it in Debian circles.
sanderjd#
Nice!