Python Fixes
8 troubleshooting guides — each with the error, why it happens, and copy-paste commands to fix it.
- Python UnicodeDecodeError: 'utf-8' Codec Can't Decode — The Encoding Truth — You read bytes as UTF-8 and they aren't.
- pip error: externally-managed-environment (PEP 668) — Debian 12+, Ubuntu 23.
- ModuleNotFoundError: No Module Named X — Interpreter and Path Mismatch — The module is probably installed — just not for the interpreter you're running, or not on sys.
- Python "ssl.SSLCertVerificationError: unable to get local issuer certificate" — Python can't verify the server's chain: missing intermediate on the server, outdated certifi bundle, or a corporate proxy re-signing traffic.
- Python "ImportError: cannot import name" — Circular Imports and Shadowing — The module imported, but the name you asked for isn't there yet — circular imports are the headline cause, followed by stale bytecode, shadowing a stdlib/package name, and version drift.
- pip: "Could Not Find a Version That Satisfies the Requirement" — pip couldn't find ANY version of that package for your interpreter.
- Python ModuleNotFoundError: The Path, The Name, or The Environment — ModuleNotFoundError means Python looked in sys.
- pip: "Can't Connect to HTTPS URL because the SSL Module Is Not Available" — Your Python was built without working OpenSSL bindings — typical for source builds, pyenv on newer distros, or an interpreter built against a dev package that isn't installed.