Prerequisites & Setup
Before you install the Truffle SDK, please ensure your environment is set up correctly. This helps avoid common issues and keeps your Python projects isolated and manageable.
1. Python 3.10+
Ubuntu / Debian
macOS
Windows (PowerShell)
sudo apt update
sudo apt install -y make build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \
libncursesw5-dev xz-utils
python3 --version
brew install python@3.10
python3 --version
choco install python --version=3.10.0
python --version
Make sure you have Python 3.10 or higher installed before proceeding.
2. Create a Virtual Environment
A virtual environment keeps your dependencies isolated. Run:
python3 -m venv truffle-env
Activate it:
Linux / macOS
Windows (PowerShell)
source truffle-env/bin/activate
truffle-env\Scripts\Activate.ps1
3. Install the Truffle SDK
With your venv active, run:
Your Python environment is now ready. You can start building with the Truffle SDK!