Python guides
Every published Python guide, newest first, with practical examples you can copy into your own project.
3,965 guides across 14 topics
Topics
Popular Python guides
Most readLatest Python guides
Page 1 of 179pip: failed building wheel and subprocess-exited-with-error
pip tried to compile because no wheel matched. Find the wheel, switch to a binary variant, or install the build dependencies.
pip: ResolutionImpossible when two requirements pin the same package
One pin too tight breaks the whole install. Read the chain, pick the side that should move, and make the resolution reproducible with a lock.
Python 3.14: asyncio get_event_loop RuntimeError and forkserver
The implicit event loop is gone and Linux workers now start with forkserver. Both break code that relied on inherited state.
Python 3.14 PEP 649: NameError from lazy annotations
Annotations are no longer strings. A NAME only imported under TYPE_CHECKING now raises when FastAPI or Pydantic reads the signature.
Python: ModuleNotFoundError: No module named 'app'
sys.path[0] is the script directory, not your project root. Run as a module, install editable, and fix the layout instead of patching the path.
pip: error: externally-managed-environment and PEP 668
PEP 668 blocks pip from touching a distribution's Python. Why the marker file exists, which venv, pipx and apt paths replace it, and when --break-system-packages is honest.
NumPy 2: Module Compiled Against API Version 0x10
NumPy 2 changed its C ABI, so extensions built against 1.x headers cannot resolve _ARRAY_API. Rebuild, upgrade the wheel, or pin numpy<2 as a stopgap.
SQLAlchemy QueuePool Limit of Size 5 Overflow 10 Reached
Either the pool leaks or it is too small, and the two need different fixes. Close sessions on every path, size workers against max_connections, and use NullPool when short-lived.
FastAPI CORS: Blocked Preflight and Credentials Wildcard
A wildcard origin with credentials is invalid and the browser enforces it; a 500 skips the CORS middleware entirely. Both look like CORS and neither is.
asyncpg DuplicatePreparedStatement on PgBouncer and Supabase
asyncpg caches prepared statements per connection while a transaction pooler rotates connections underneath it. The cache setting, pool sizing and retry that fix it.