News for hackers. Stuff that matters.
Re:Hypermodern Python by EE84M3i on Thursday May 28, 2020 @09:58AM (#23337272)
Does bin/python in a virtualenv set PYTHONHOME correctly..?
Re:Hypermodern Python by remlov on Thursday May 28, 2020 @11:18AM (#23338338)
Yes. And the answer by Chiron1991 is the proper way to do this since pretty much forever.
Re:Hypermodern Python by EE84M3i on Thursday May 28, 2020 @11:54AM (#23338758)
Strange, this does seem to work with python3.8 on ubuntu 20.04 (the site-packages shows up in sys.path), but for me in a virtualenv bin/python is a symlink to the system python, so how does python 'know' what path to use? Is there logic baked into the interpreter?

I seem to recall that with python2.7 that calling bin/python in a virtualenv without activating the virtualenv did not used to "work" (i.e. it would use the system packages). Did this change at some point or is my memory just wrong?

Re:Hypermodern Python by jalons on Thursday May 28, 2020 @05:52PM (#23343206)
Yes, if the python interpreter the poetry environment utilizes is in your $PATH.