Troubleshooting¶
Use this page when you already have a failing finding and need the shortest practical recovery path.
PyTorch CUDA Mismatch¶
Symptoms
nvidia-smiworkstorch.cuda.is_available()returnsFalse- mlenvdoctor reports
root_pytorch_cuda_mismatchorroot_pytorch_cpu_only_build
Fix
python -m pip uninstall -y torch torchvision torchaudio
python -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124
python -c "import torch; print(torch.__version__); print(torch.cuda.is_available())"
Common trap
Installing torch from the default PyPI index may give you a CPU-only or incompatible build depending on platform and version. Use the PyTorch index URL that matches your target CUDA runtime.
NVIDIA Driver Not Visible¶
Symptoms
nvidia-smiis missing or fails- Docker GPU tests fail before Python imports matter
Fix
Then rerun:
Pipenv Lock Stale¶
Symptoms
- Your lock file was generated before dependency changes
- The package import differs between shells
- CI and local installs disagree
Fix
Conda Environment Drift¶
Symptoms
which pythonorwhere pythonpoints outside the expected environmentconda list pytorchandpython -m pip show torchdisagree
Fix
Docker GPU Unavailable¶
Symptoms
- Host
nvidia-smiworks docker run --gpus all ... nvidia-smifails- mlenvdoctor reports
docker_gpu
Fix
docker run --rm --gpus all nvidia/cuda:12.4.0-base-ubuntu22.04 nvidia-smi
mlenvdoctor diagnose --full
If the Docker test fails, repair NVIDIA Container Toolkit before changing Python packages.
Hugging Face Cannot Be Reached¶
If that fails, check DNS, proxy, VPN, corporate firewall rules, or offline mirrors.
Still Stuck¶
Generate a report:
Share the HTML report with a teammate and attach the JSON report to an issue.