--- /dev/null
+During the :ref:`path initialization <sys-path-init>`, we now check if
+``base_exec_prefix`` is the same as ``base_prefix`` before falling back to
+searching the Python interpreter directory.
# gh-100320: Our PYDs are assumed to be relative to the Lib directory
# (that is, prefix) rather than the executable (that is, executable_dir)
exec_prefix = prefix
+ if not exec_prefix and prefix and isdir(joinpath(prefix, PLATSTDLIB_LANDMARK)):
+ exec_prefix = prefix
if not exec_prefix and executable_dir:
exec_prefix = search_up(executable_dir, PLATSTDLIB_LANDMARK, test=isdir)
if not exec_prefix and EXEC_PREFIX: