Skip to content

Setting Up a Development Environment⚓︎

This page lists the dependencies required to run the tutorials in this documentation and explains how to run them.

Select the language you prefer:

PrerequisitesPython 3.10 or later
Installation Install the Symbol SDK version 3.3.1 with:
pip install symbol-sdk-python --upgrade
Running the Sample Code Download a sample and run it with:
python hello-world.py

Troubleshooting

On some systems, installing the SDK may require additional system packages, because some Python dependencies are built from source.

If installation fails with errors related to missing headers, libraries, or compiler tools, install the required development packages for your system and run the installation again.

Common symptoms include errors mentioning gcc or pysha3.

On Ubuntu and Debian, it is typically enough to install:

sudo apt install python3-dev build-essential

Then run the Symbol SDK installation again.

PrerequisitesAny actively supported version of Node.js
Installation Create a project folder and install the Symbol SDK version 3.3.1 as a dependency:
mkdir symbol-dev && cd symbol-dev
npm init -y
npm install symbol-sdk
Running the Sample Code Download a sample and run it with:
node hello-world.mjs

PrerequisitesJBang

The tutorials use JBang to simplify Java version and dependency management, but it is not a requirement for applications.

Installation The Java snippets use JBang comments to select a compatible Java version and load the Symbol SDK directly from Maven Central:
//JAVA 21+
//DEPS org.symbol:symbol-sdk:3.3.1

When you run a snippet, JBang downloads the Symbol SDK and its dependencies into its local cache. No pom.xml, build.gradle, or manual classpath setup is required.

Running the Sample Code Download a sample and run it with:
jbang HelloWorld.java

Alternate SDK installation

If you are building a Java application instead of running standalone snippets, add the Symbol SDK to your project with your build tool.

repositories {
    mavenCentral()
}

dependencies {
    implementation("org.symbol:symbol-sdk:3.3.1")
}
<dependency>
    <groupId>org.symbol</groupId>
    <artifactId>symbol-sdk</artifactId>
    <version>3.3.1</version>
</dependency>

Use Java 21 or later.

Troubleshooting
  • If the jbang command is not found after installation, restart your terminal and try again.

  • Java snippets declare //JAVA 21+, so JBang will use a compatible JDK when available.

    If JBang cannot find or download one, install a Java 21 or later JDK and run the snippet again.

  • If the Symbol SDK dependency cannot be resolved, check your network connection, clear JBang's cache, and run the snippet again:

    jbang cache clear
    jbang HelloWorld.java
    

Next Steps⚓︎