Skip to main content

Installation Methods

Dependencies

Impacket requires the following Python packages, which are automatically installed:

Core Dependencies

pyasn1>=0.2.3
pyasn1_modules
pycryptodomex
pyOpenSSL
six
charset_normalizer

Protocol-Specific Dependencies

ldap3>=2.5,!=2.5.2,!=2.5.0,!=2.6
ldapdomaindump>=0.9.0
flask>=1.0

Platform-Specific

pyreadline3  # Windows only

Python Version Requirements

Impacket supports the following Python versions:

Python 3.9

Fully supported

Python 3.10

Fully supported

Python 3.11

Fully supported

Python 3.12

Fully supported

Python 3.13

Fully supported
Python 2.x is no longer supported. Please use Python 3.9 or later.

Virtual Environment Setup

For development or testing, it’s recommended to use a virtual environment:
# Create virtual environment
python3 -m venv impacket-env

# Activate (Linux/macOS)
source impacket-env/bin/activate

# Activate (Windows)
impacket-env\Scripts\activate

# Install Impacket
pip install impacket

Upgrading Impacket

python3 -m pipx upgrade impacket

Troubleshooting

Make sure Impacket is installed in the correct Python environment:
# Check Python version
python3 --version

# Check if impacket is installed
python3 -m pip list | grep impacket

# Reinstall if necessary
python3 -m pip install --force-reinstall impacket
On Linux/macOS, you may need to use --user flag or run with appropriate permissions:
pip install --user impacket
Or use pipx which handles user installations automatically.
If you encounter SSL errors, update your certificates:
pip install --upgrade certifi

Next Steps

Quick Start Guide

Ready to write your first Impacket script? Continue to the Quick Start guide.

Build docs developers (and LLMs) love