Skip to main content

Prerequisites & Setup

Before you install the Truffle SDK, please ensure your environment is set up correctly. This will help avoid common issues and keep your Python projects isolated and manageable.

1. Python 3.10

Install build-dependences and check for Python 3.10+:

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

If you need to install Python 3.10 via apt:

sudo apt install python3.10 python3.10-venv python3.10-distutils

2. Virtual environment

A virtual environment keeps your dependencies isolated. Run:

# Create the venv
python3 -m venv truffle-env

# On Linux/macOS:
source truffle-env/bin/activate

# On Windows (PowerShell):
truffle-env\Scripts\Activate.ps1

3. The SDK

Ensure you have Python 3.10+ installed and your virtual environment is activated, then install the Truffle SDK:

pip install truffle-sdk