/usr/local/bin shall never be referenced in this file as /usr/local/bin/python3 is just a symlink on /opt/hostedtoolcache/Python/3.11.7/x64/bin/python3
importing subprocess fails because the computed sys.path is invalid for this interpreter (/usr/lib/python3.11/lib-dynload is invalid here):
Issue
The
home
&base-executable
keys inpyvenv.cfg
do not resolve symlinks usingrealpath()
leading to a broken virtual environment in some cases.c.f. https://github.com/python/cpython/issues/106045
Environment
Provide at least:
on: push: branches:
allow manual runs on branches without a PR
jobs: venv: runs-on: ubuntu-22.04 steps:
Output
the
cp311-4
is broken & uses the followingpyvenv.cfg
:/usr/local/bin
shall never be referenced in this file as/usr/local/bin/python3
is just a symlink on/opt/hostedtoolcache/Python/3.11.7/x64/bin/python3
importing subprocess fails because the computed sys.path is invalid for this interpreter (
/usr/lib/python3.11/lib-dynload
is invalid here):