Python SDK
Installation
How to install and set up zksync2-python for your project.
Prerequisites
Make sure you have the following software installed on your system:
- Python: Version 3.8 or higher. Download and install it from the Python website.
- Pip: Version 23.1.2 or higher. Pip is the package installer for Python. Install it using the guide on the Pip website.
Adding dependencies
To add the ZKsync Era SDK to your project, follow these steps:
- Open your terminal: Use any terminal or command line interface you like.
- Install the ZKsync Era SDK: Run this command to install the SDK with pip:
pip install zksync2
Verification
Check if the installation was successful by importing the SDK in a Python script or an interactive Python session:
import importlib.metadata
zksync_version = importlib.metadata.version("zksync2")
print("ZKsync SDK version:", zksync_version)
You should see a response like:
ZKsync SDK version: 1.2.0