Repository navigation
Windows embeddable distribution outputs WARN: Could not find the platform standard library directory! #155254
Description
Activity
- addedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
on Aug 5, 2026 cc @zooba
I think it's a duplicate of #148750, based on Steve's comment there, but Windows things are scary so I'll leave this to someone else. ;-)
- addedpendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is provided
on Aug 5, 2026 Yes, I think it's the same issue, and it's critical now because it's going to block PyManager updates (I expect python/pymanager#397 will fail in CI, as it's failing locally for me).
Still don't have time to look into it (I'm meant to be AFK and recovering right now), but will prioritise and block releases on this once I'm back online properly.
@chris-eibl found that this issue pre-dates #148750, so we should solve both, but they're likely independent.
Tagging this as a release blocker as well, since new extra/unnecessary output can be a major regression for users. But the fix (just disable the warning when the user has configured paths themselves) should be safe enough.
Reacted by Chris EiblDebugging using
Line 29 in c5168ea
# warn(message) -- print a warning (if enabled)
shows that
Lines 777 to 779 in c5168ea
elif not platstdlib_dir or not isdir(platstdlib_dir): hint = home_hint if home else f'sys.exec_prefix is set to {exec_prefix}, is this correct?' warn('WARN: Could not find the platform standard library directory! ' + hint)
fires becauseplatstdlib_dir="<embedded-dir>\DLLs", which does not exist in the embedded case. IIUC, it is set here
Lines 740 to 741 in c5168ea
if not platstdlib_dir and base_exec_prefix: platstdlib_dir = joinpath(base_exec_prefix, PLATSTDLIB_LANDMARK)
where
Line 194 in c5168ea
PLATSTDLIB_LANDMARK = f'{platlibdir}'
andsys.platlibdir="DLLs". This has been the case for ages, but I wonder whether this should be an empty string in the embedded case?The problem is that there's no "embedded case" - we only have one build, and the adaptation is dynamic.
Suppressing the warning when a
._pthfile is used matches the same suppression whenPy_SetPathor similar have been used, I think it was just missed.Reacted by Chris Eibl- added a commit that references this issue
on Aug 21, 2026 - added a commit that references this issue
on Aug 25, 2026 - moved this from Todo to Done in Release and Deferred blockers 🚫
on Aug 25, 2026
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsDone
Bug report
Bug description:
When the Windows embeddable distribution version 3.15.0rc1 is extracted and
python.exeis run, a warning is shown.The warning first appears in 3.15.0a7. It is not present in 3.15.0a6 or 3.14.7. #145273 looks suspicious.
CPython versions tested on:
3.15
Operating systems tested on:
Windows
Linked PRs