PGO-instrumented binary seems not to specify the stdlib directory on PR29041. I can run it with PYTHONPATH set.
Python path configuration:
PYTHONHOME = 'C:\Py311\'
PYTHONPATH = (not set)
program name = 'C:\Py311\PCbuild\amd64\instrumented\python.exe'
isolated = 0
environment = 1
user site = 1
import site = 1
is in build tree = 1
stdlib dir = 'C:\Py311\PCbuild\Lib'
sys._base_executable = 'C:\\py311\\PCbuild\\amd64\\instrumented\\python.exe'
sys.base_prefix = 'C:\\py311\\'
sys.base_exec_prefix = 'C:\\py311\\'
sys.platlibdir = 'DLLs'
sys.executable = 'C:\\py311\\PCbuild\\amd64\\instrumented\\python.exe'
sys.prefix = 'C:\\py311\\'
sys.exec_prefix = 'C:\\py311\\'
sys.path = [
'C:\\py311\\PCbuild\\amd64\\instrumented\\python311.zip',
'C:\\py311\\PCbuild\\Lib',
'C:\\py311\\PCbuild\\amd64\\instrumented',
]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'