This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author steve.dower
Recipients docs@python, eryksun, gaborjbernat, keller00, paul.moore, steve.dower, tim.golden, vinay.sajip, zach.ware
Date 2020-10-16.18:17:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> The bit that I *do* think is a venv gotcha is that it's entirely reasonable for a user to expect that if they run path\to\venv\Scripts\python.exe, then their Python script will be run by that executable.

This is still true, though, as much as it's ever been. The gotcha is that launching "python" may not launch "path\to\venv\Scripts\python.exe" even if that's the first entry on PATH.

For the documentation, we could phrase it more positively as "If you need the path to the Python executable, use sys.executable. Relying on explicit or implicit PATH resolution may result in the wrong version of Python being used, especially when the user has launched from a virtual environment."
Date User Action Args
2020-10-16 18:17:42steve.dowersetrecipients: + steve.dower, paul.moore, vinay.sajip, tim.golden, docs@python, zach.ware, eryksun, gaborjbernat, keller00
2020-10-16 18:17:42steve.dowersetmessageid: <>
2020-10-16 18:17:42steve.dowerlinkissue42041 messages
2020-10-16 18:17:42steve.dowercreate