Packaging & Environments
pip, poetry, uv, virtualenvs and ModuleNotFoundError.
5 articles
Error loading ASGI app: why uvicorn cannot import your FastAPI module
Uvicorn resolves 'module:app' against sys.path, not your file's location. The real cause, the right command for flat, package, src and Docker layouts, and how to verify it.
ModuleNotFoundError: No module named 'fastapi' - the Three Unrelated Causes
One error message, three completely different causes: wrong virtualenv, package not installed, or a stale editable install left behind by switching between pip, poetry and uv.
'No module named pydantic_core._pydantic_core' in Docker or Lambda Is an Architecture Mismatch
This error is not a missing package. pydantic-core ships a compiled Rust wheel, and installing it for the wrong CPU or glibc means the files exist but cannot load.
pip 'externally-managed-environment': What PEP 668 Protects and the Right Fix
The externally-managed-environment error is PEP 668 stopping pip from corrupting your OS packages. Use a venv, not --break-system-packages, and here is exactly why --user is not reliable.
cannot import name 'Table' from 'frappe.query_builder': Use DocType
The frappe.query_builder rewrite around pypika dropped Table with no shim. Here is the correct import, the root cause, and version-tolerant code that survives upgrades.