This guide provides a step-by-step walkthrough for setting up the Hiero Python SDK development environment specifically for Windows users. We will use PowerShell and uv for dependency management.
Before you begin, ensure you have the following installed on your system:
- Git for Windows: Download and install Git.
- Python 3.10+: Download and install Python. Ensure "Add Python to PATH" is checked during installation.
- GitHub Account: You will need a GitHub account to fork the repository.
- Navigate to the hiero-sdk-python repository and click the Fork button.
- Open PowerShell and run the following commands to clone your fork:
# Clone the repository
git clone https://github.com/<your-username>/hiero-sdk-python.git
# Navigate into the project directory
cd hiero-sdk-pythonThe Hiero Python SDK uses uv for extremely fast Python package and environment management.
- In your PowerShell window, run the following command to install
uv:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
⚠️ Important: After the installation finishes, you must close your current PowerShell window and open a new one for the changes to take effect. Alternatively, you can reload your environment variables.
- Verify the installation by running:
uv --versionOnce uv is installed and you are inside the project directory, run:
uv syncThis command will create a virtual environment and install all necessary development dependencies automatically.
The SDK requires generated protobuf files to communicate with the network. Run the following command to generate them:
uv run python generate_proto.pyIf you receive an error stating that uv is not recognized as a cmdlet or function, ensure that the installation path (typically %USERPROFILE%\.local\bin) is added to your Windows Environment Variables (PATH).
If you encounter errors running scripts in PowerShell, you may need to adjust your execution policy. Run PowerShell as an Administrator and execute:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUserWhile this guide focuses on PowerShell, you can also use Git Bash. If using Git Bash, follow the Standard Setup Guide as it behaves similarly to a Unix shell.