How to Install paramiko in Python
SSH2 protocol library
pip install paramiko
What is paramiko?
SSH2 protocol library
Paramiko is a pure-Python [#] implementation of the SSHv2 protocol [#], providing both client and server functionality. It provides the foundation for the high-level SSH library , which is what we recommend you use for common client use-cases such as running remote shell commands or transferring files.
Direct use of Paramiko itself is only intended for users who need advanced/low-level primitives or want to run an in-Python sshd.
For installation information, changelogs, FAQs and similar, please visit `our main project website the versioned docs `. Additionally, the project maintainer keeps a on his personal site.
Quick Start
Minimal example to get started with paramiko:
import paramiko
print(paramiko.__version__)
Installation
pip (standard)
pip install paramiko
Virtual environment (recommended)
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install paramiko
pip3
pip3 install paramiko
conda
conda install -c conda-forge paramiko
Poetry
poetry add paramiko
Dependencies
Installing paramiko will also install these packages:
Verify the Installation
After installing, confirm the package is available:
python -c "import paramiko; print(paramiko.__version__)"
If this prints a version number, installation succeeded. If you see a ModuleNotFoundError, see the errors section below.
Installation Errors
Common errors when installing paramiko with pip.
ModuleNotFoundError: No module named 'paramiko'
Cause: The package is not installed in the current Python environment.
Fix: Run pip install paramiko. If using a virtual environment, ensure it is activated first.
ModuleNotFoundError: No module named 'paramiko' (installed but still failing)
Cause: pip installed the package into a different Python than the one running your script.
Fix: Use python -m pip install paramiko to install into the interpreter you are running.
ImportError: cannot import name 'X' from 'paramiko'
Cause: The function or class does not exist in the installed version.
Fix: Check the version with pip show paramiko and upgrade with pip install --upgrade paramiko.
pip: command not found
Cause: pip is not in PATH or Python was not added to PATH during installation.
Fix: Try python -m pip install paramiko. On macOS/Linux try pip3.
PermissionError: [Errno 13] Permission denied
Cause: No write access to the system Python package directory.
Fix: Use a virtual environment, or add --user: pip install --user paramiko
SSL: CERTIFICATE_VERIFY_FAILED
Cause: pip cannot verify PyPI's SSL certificate — common behind corporate proxies.
Fix: Try: pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org paramiko
Recent Releases
| Version | Released |
|---|---|
4.0.0 latest |
2025-08-04 |
3.5.1 |
2025-02-04 |
3.5.0 |
2024-09-15 |
3.3.2 |
2024-08-11 |
3.4.1 |
2024-08-11 |
Manage paramiko
Upgrade to latest version
pip install --upgrade paramiko
Install a specific version
pip install paramiko==4.0.0
Uninstall
pip uninstall paramiko
Check what is installed
pip show paramiko