Opened 7 months ago
Closed 6 months ago
#814 closed defect (fixed)
stdlib venv's broken on new Python 3.9.18
Reported by: | akominlsfi | Owned by: | |
---|---|---|---|
Priority: | critical | Component: | Package |
Version: | Keywords: | python, stdlib, venv, dll | |
Cc: |
Description
After Python update to 3.9.18, stdlib venv module usage is broken.
This may be due to venv .exes being the same exact exe as the original, copied in this line? Not sure if the compilation even outputs these venvlauncher exes, which I assume would be needed in that directory instead of the original exes?
Is using the bundled Python standalone without any PATH/env manipulation even a supported use case? This can be patched manually for our workflow by grabbing previous 3.9 version launcher exes and dropping those into the python lib venv directory, since then the created venvs use the launchers, and correctly resolve the source exes. Version mismatch between the launcher and source seems to be an actually valid use case (for not needing venv recreation after the Python itself is updated).
For context our current plugin development install workflow on Windows looks this this (related to previous issue about stdlib dll patching):
For the installed branch of QGIS Python to work directly as well (referring the last issue conversation, this is only applicable when there is only one ltr/non-ltr branch in same root directory):
With this workflow we never need to add anything to PATH or environment (since we might have multiple installations on the same machine), and venvs work automatically when using /apps/python39/python.exe directly.