Skip to main content
SUBMIT A PRSUBMIT AN ISSUElast edit: Jul 07, 2025

Install Bittensor SDK

Before you can start developing, you must install Bittensor SDK and then create Bittensor wallet.

Supported Python versions

Upgrade the Bittensor SDK

If you already installed Bittensor SDK, make sure you upgrade to the latest version. Run the below command:

python3 -m pip install --upgrade bittensor

Install on macOS and Linux

You can install Bittensor on your macOS or Linux machine using any one of the available options. Make sure you verify your installation after you install.

Rust Required on Linux

To install the Bittensor SDK on Linux, you must have Rust installed. For information on Rust installation and setup, see the official Rust documentation.

Create and activate a virtual environment

To avoid dependency issues while installing the Bittensor SDK, we recommend creating and activating a Python Virtual environment on your machine before installing the SDK. To do this, ensure you have Python3 installed on your local machine using the following command:

python3 --version

Then run the following command in your terminal:

python3 -m venv btsdk_venv
source btsdk_venv/bin/activate

You can install Bittensor via the Python Package Index using any of the below options:

  • Install SDK: Run the below command to install Bittensor SDK in the above virtual environment. This will install btcli also.

    pip install bittensor
  • Install SDK with torch: Install Bittensor SDK with torch.

    pip install bittensor[torch]

    If the command fails in your environment, try enclosing the argument in quotes as shown:

      pip install "bittensor[torch]"
  • Install SDK with cubit: Install Bittensor SDK with cubit.

    1. Install cubit first. See the Install section. Only Python 3.9 and 3.10 versions are supported.
    2. Then install SDK with pip install bittensor.

Install on Windows

To install and run Bittensor SDK on Windows you must install WSL 2 (Windows Subsystem for Linux) on Windows and select Ubuntu Linux distribution.

After you installed the above, follow the same installation steps described above in Install on macOS and Linux.

Limited support on Windows

While wallet transactions like delegating, transfer, registering, staking can be performed on a Windows machine using WSL 2, the mining and validating operations are not recommended and are not supported on Windows machines.

Verify the installation

You can verify your installation in either of the following ways shown:

Run the following command in your terminal:

python3 -m bittensor

The response will show you the <version number> of the btsdk you just installed as shown:

Bittensor SDK version: <version number>

Developer reference

For a full developer reference of the Bittensor SDK, see the Bittensor SDK section.