René's URL Explorer Experiment


Title: Issue warning when the we can't find a valid standard library during path initialization · Issue #145273 · python/cpython · GitHub

Open Graph Title: Issue warning when the we can't find a valid standard library during path initialization · Issue #145273 · python/cpython

X Title: Issue warning when the we can't find a valid standard library during path initialization · Issue #145273 · python/cpython

Description: Feature or enhancement Proposal: Currently, if we don't find the standard library, we fail with an obscure message. $ PYTHONHOME=nonsense ./python -c 'print("foo!")' Fatal Python error: Failed to import encodings module Python runtime st...

Open Graph Description: Feature or enhancement Proposal: Currently, if we don't find the standard library, we fail with an obscure message. $ PYTHONHOME=nonsense ./python -c 'print("foo!")' Fatal Python error: Failed to i...

X Description: Feature or enhancement Proposal: Currently, if we don't find the standard library, we fail with an obscure message. $ PYTHONHOME=nonsense ./python -c 'print("foo!")' Fatal Pyt...

Opengraph URL: https://github.com/python/cpython/issues/145273

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Issue warning when the we can't find a valid standard library during path initialization","articleBody":"# Feature or enhancement\n\n### Proposal:\n\nCurrently, if we don't find the standard library, we fail with an obscure message.\n\n```python\n$ PYTHONHOME=nonsense ./python -c 'print(\"foo!\")'\nFatal Python error: Failed to import encodings module\nPython runtime state: core initialized\nException ignored in the internal traceback machinery:\nModuleNotFoundError: No module named 'traceback'\nModuleNotFoundError: No module named 'encodings'\n\nStack (most recent call first):\n```\n\nThis is a common problem, as can be seen with a quick google search. One of the top results is a [nonsense AI slop blogpost](https://www.geeksforgeeks.org/python/resolve-no-module-named-encoding-in-python/).\n\nIt is generally caused or a misconfigured Python home directory, either by setting `PYTHONHOME`, or by broken virtual environments.\nIt would be helpful to show a warning if we are unable to find a valid standard library during initialization.\n\n```python\nWARN: Could not find the standard library directory! The Python 'home' directory was set to 'nonsense', is this correct?\nFatal Python error: Failed to import encodings module\nPython runtime state: core initialized\nException ignored in the internal traceback machinery:\nModuleNotFoundError: No module named 'traceback'\nModuleNotFoundError: No module named 'encodings'\n\nStack (most recent call first):\n```\n\nBad `._pth` files can also cause this.\n\n### Has this already been discussed elsewhere?\n\nNo response given\n\n### Links to previous discussion of this feature:\n\n_No response_\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-145274\n* gh-145437\n* gh-145442\n* gh-145544\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/FFY00","@type":"Person","name":"FFY00"},"datePublished":"2026-02-26T20:48:22Z","url":"https://github.com/python/cpython/issues/145273"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:a160335d-9e6d-be87-c385-1558fc11b6b3
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idEB3E:2D40DE:3425111:425D271:6B021B33
html-safe-nonceaee26cb8460ab2fc0acae11806c2a2be4873e884b3594fcfbffc0eca75169e70
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQjNFOjJENDBERTozNDI1MTExOjQyNUQyNzE6NkIwMjFCMzMiLCJ2aXNpdG9yX2lkIjoiMzMyMTE5MTMzNTgyNTkwNjQ4MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac50dc830c8168abe1ab0666f55b4251ec52ec7dafd46bfeb22e6266e134b22016
hovercard-subject-tagissue:3997681078
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/145273/issue_layout
twitter:imagehttps://opengraph.githubassets.com/d07161e32b3036261bbbced0e3aa41b49cd6ccb2fc226773a9a75f97a2b7b81a/python/cpython/issues/145273
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/d07161e32b3036261bbbced0e3aa41b49cd6ccb2fc226773a9a75f97a2b7b81a/python/cpython/issues/145273
og:image:altFeature or enhancement Proposal: Currently, if we don't find the standard library, we fail with an obscure message. $ PYTHONHOME=nonsense ./python -c 'print("foo!")' Fatal Python error: Failed to i...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameFFY00
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/cpython/issues/145273#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F145273
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F145273
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/issues/145273
Reloadhttps://github.com/python/cpython/issues/145273
Reloadhttps://github.com/python/cpython/issues/145273
pythonhttps://github.com/python
cpythonhttps://github.com/python/cpython
Codehttps://github.com/python/cpython
Issues5k+ (5k+)https://github.com/python/cpython/issues
Pull requests2.4k (2.4k)https://github.com/python/cpython/pulls
Actionshttps://github.com/python/cpython/actions
Projectshttps://github.com/python/cpython/projects
Security and qualityhttps://github.com/python/cpython/security
Insightshttps://github.com/python/cpython/insights
https://github.com/python/cpython
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/145273
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/145273
Issue warning when the we can't find a valid standard library during path initializationhttps://github.com/python/cpython/issues/145273#top
interpreter-core(Objects, Python, Grammar, and Parser dirs)https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22interpreter-core%22
type-featureA feature request or enhancementhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-feature%22
https://github.com/FFY00
FFY00https://github.com/FFY00
on Feb 26, 2026https://github.com/python/cpython/issues/145273#issue-3997681078
nonsense AI slop blogposthttps://www.geeksforgeeks.org/python/resolve-no-module-named-encoding-in-python/
GH-145273: warn when we can't find the standard library #145274https://github.com/python/cpython/pull/145274
GH-145273: drop build_prefix check from missing stdlib warning #145437https://github.com/python/cpython/pull/145437
GH-145273: skip stdlib warning on module_search_paths_set #145442https://github.com/python/cpython/pull/145442
GH-145273: don't skip missing platstdlib warning if stdlib_zip is found #145544https://github.com/python/cpython/pull/145544
FFY00https://github.com/FFY00
type-featureA feature request or enhancementhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-feature%22
interpreter-core(Objects, Python, Grammar, and Parser dirs)https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22interpreter-core%22
on Feb 26, 2026https://github.com/python/cpython/issues/145273#event-23116645861
FFY00https://github.com/FFY00
on Feb 26, 2026https://github.com/python/cpython/issues/145273#event-23116738022
pythonGH-145273: warn when we can't find the standard libraryhttps://github.com/FFY00/cpython/commit/08846b2c6f6c72c86f764bc07767ef9d49bad742
pythonGH-145273https://github.com/python/cpython/issues/145273
08846b2https://github.com/FFY00/cpython/commit/08846b2c6f6c72c86f764bc07767ef9d49bad742
GH-145273: warn when we can't find the standard library (#145274)https://github.com/python/cpython/commit/3ab39d2308c591b8dcee60e5e733ab0b5e5d8ad3
GH-145273https://github.com/python/cpython/issues/145273
#145274https://github.com/python/cpython/pull/145274
3ab39d2https://github.com/python/cpython/commit/3ab39d2308c591b8dcee60e5e733ab0b5e5d8ad3
GH-145273: drop build_prefix check from missing stdlib warning (#145437)https://github.com/python/cpython/commit/539a985faca498e345e471476cb377c1c57ea07f
GH-145273https://github.com/python/cpython/issues/145273
#145437https://github.com/python/cpython/pull/145437
539a985https://github.com/python/cpython/commit/539a985faca498e345e471476cb377c1c57ea07f
pythonGH-145273: skip stdlib warning on module_search_paths_sethttps://github.com/FFY00/cpython/commit/0e31eca7ae393b194b2533ec11eb8194db3eaf2e
pythonGH-145273https://github.com/python/cpython/issues/145273
0e31ecahttps://github.com/FFY00/cpython/commit/0e31eca7ae393b194b2533ec11eb8194db3eaf2e
GH-145273: skip stdlib warning on module_search_paths_set (#145442)https://github.com/python/cpython/commit/46c5c57226862bc078bcdf0c9f5b40951b8615a5
GH-145273https://github.com/python/cpython/issues/145273
#145442https://github.com/python/cpython/pull/145442
46c5c57https://github.com/python/cpython/commit/46c5c57226862bc078bcdf0c9f5b40951b8615a5
pythonGH-145273: don't skip missing platstdlib_dir warning if stdlib_…https://github.com/FFY00/cpython/commit/de3a21f07fd8ef6006d8b50eaaaebd209dc74673
pythonGH-145273https://github.com/python/cpython/issues/145273
de3a21fhttps://github.com/FFY00/cpython/commit/de3a21f07fd8ef6006d8b50eaaaebd209dc74673
GH-145273: don't skip missing platstdlib warning if stdlib_zip is fou…https://github.com/python/cpython/commit/64d6c75dd02718e3554657a0c58c39122bf229ec
GH-145273https://github.com/python/cpython/issues/145273
64d6c75https://github.com/python/cpython/commit/64d6c75dd02718e3554657a0c58c39122bf229ec
FFY00https://github.com/FFY00
completedhttps://github.com/python/cpython/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Apr 16, 2026https://github.com/python/cpython/issues/145273#event-24576090913
ljfphttps://github.com/ljfp
on Apr 25, 2026https://github.com/python/cpython/issues/145273#event-24868321629
pythonGH-145273: warn when we can't find the standard library (python…https://github.com/ljfp/cpython/commit/eaa27773c62b0a60aea177c83f24d78759fa6c4b
pythonGH-145273https://github.com/python/cpython/issues/145273
python…https://github.com/python/cpython/pull/145274
eaa2777https://github.com/ljfp/cpython/commit/eaa27773c62b0a60aea177c83f24d78759fa6c4b
pythonGH-145273: drop build_prefix check from missing stdlib warning (p…https://github.com/ljfp/cpython/commit/8edf1c88b1a6a842175a93175b205fc622a81d97
pythonGH-145273https://github.com/python/cpython/issues/145273
p…https://github.com/python/cpython/pull/145437
8edf1c8https://github.com/ljfp/cpython/commit/8edf1c88b1a6a842175a93175b205fc622a81d97
pythonGH-145273: skip stdlib warning on module_search_paths_set (pyth…https://github.com/ljfp/cpython/commit/276b997c612004f818c4ca7b3114ca4a11f4ed1f
pythonGH-145273https://github.com/python/cpython/issues/145273
pyth…https://github.com/python/cpython/pull/145442
276b997https://github.com/ljfp/cpython/commit/276b997c612004f818c4ca7b3114ca4a11f4ed1f
pythonGH-145273: don't skip missing platstdlib warning if stdlib_zip …https://github.com/ljfp/cpython/commit/d2ecb9dbd5e2fa3d444dedc5b55d52fa5e9ea242
pythonGH-145273https://github.com/python/cpython/issues/145273
d2ecb9dhttps://github.com/ljfp/cpython/commit/d2ecb9dbd5e2fa3d444dedc5b55d52fa5e9ea242
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/cpython/issues/145273
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/cpython/issues/145273
interpreter-core(Objects, Python, Grammar, and Parser dirs)https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22interpreter-core%22
type-featureA feature request or enhancementhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-feature%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.