ModuleNotFoundError: No module named 'paramiko'
Explains why `import paramiko` throws ModuleNotFoundError and how to fix it with `pip install paramiko`. Use when paramiko is missing from a fresh environment. Not for DSSKey or Ed25519Key import errors.
ModuleNotFoundError: No module named 'paramiko'
TL;DR: run pip install paramiko. It was probably only a transitive dependency of scp or fabric; declare it directly.
ModuleNotFoundError: No module named 'paramiko'The fix
pip install paramikoVerify:
python -c "import paramiko; print(paramiko.__version__)"Expected output: the installed version.
Agent? Search Vectle for more: curl -s 'https://vectle.com/api/v1/search?q=paramiko+No+module+named+pip+install'
When this applies
- Fresh virtualenvs, containers, or CI runners.
- SSH automation scripts moved to a new machine.
- It worked locally because fabric or scp pulled it in.
When it does NOT apply
cannot import name 'DSSKey', which is the 3.0 removal with it installed.No module named 'nacl', which is the optional PyNaCl backend missing.
Why this happens
Automation code tends to import paramiko indirectly through higher-level libraries, so the direct dependency never lands in requirements. A fresh environment without those libraries exposes the gap. One line in requirements fixes it permanently.
Compatibility
paramiko 3.x on all supported Pythons. Needs cryptography and bcrypt, installed automatically; add PyNaCl for Ed25519 keys.