pytorch_lightning or lightning is missing: follow the node's actual import path
Different projects and revisions may use different namespaces. Installing either distribution is not automatically sufficient for every consumer, and checkpoint errors are not simply missing-package errors.
Scope and symptoms
Different projects and revisions may use different namespaces. Installing either distribution is not automatically sufficient for every consumer, and checkpoint errors are not simply missing-package errors.
Search fragments; wording and context vary:
No module named 'pytorch_lightning'
No module named 'lightning'
Source-supported context
The Lightning project and distribution documentation cover lightning and pytorch-lightning usage. A consuming node can retain a historical import path and version requirements, so its own code and metadata determine what is needed. V04-LIGHTNING
Distinguish these cases
1. The expected namespace is unavailable in the active environment.
2. Import starts but fails inside another dependency rather than because the top-level library is absent.
3. The framework loads while an older checkpoint, auxiliary class or API is incompatible with the combination.
Suggested diagnostic sequence
This sequence is editorial guidance, not a diagnosis of your machine.
1. Locate the actual import path in the earliest exception and record both the node revision and distribution metadata. Installed metadata does not guarantee a successful import.
2. Prepare the node's declared dependencies in a recoverable copy and inspect the full import chain. Do not stack random old and new packages or globally downgrade Torch to mask an API change.
3. For checkpoint failures, verify model origin, framework requirements and the supported loading procedure. Do not deserialize an untrusted file or broaden execution permissions merely to bypass a warning.
4. Run the author's minimal loading or inference example before the full workflow. Record import repair and model restoration as separate outcomes.
Completion checks
Required namespaces and dependent imports work, a trusted checkpoint restores through the intended procedure and the minimal task completes.
Limits and cautions
No combination is asserted to support every historical checkpoint. Framework availability does not establish compatibility of a particular model, Torchvision version or training implementation.
Source review: 2026-09-22. No installation, GPU inference or user-environment repair was executed.
Original sources
- PyTorch Lightning publisher package page · 2026-09-22
Related guides
Was this page helpful?
Anonymous. Only a yes/no counter is stored; no account, IP address or device details.
Sources & references
Source-based editorial draft; no runtime verification. Version observations are scoped, and unknown wrapper identity is explicit.
01PyTorch Lightning publisher package pageSource checked: 2026-09-22