Skip to main content

Cross-platform Python bindings for Helios 3D plant simulation

Project description



Build Wheels Test Linux Test Windows Test MacOS PyPI version

Getting Started {#GettingStarted}

Cross-platform Python bindings for Helios 3D plant simulation library.

PyHelios provides a Python interface to the powerful Helios C++ library for 3D physical simulation of plant and environmental systems. It enables plant modeling, geometry manipulation, and biophysical simulations including GPU-accelerated radiation transfer, photosynthesis, and plant architecture modeling.

📖 Complete Documentation

⚠️Note that this is a work in progress. Not all Helios functionality has been implemented in PyHelios ⚠️

⚠️Help make PyHelios better by reporting issues: https://github.com/PlantSimulationLab/PyHelios/issues ⚠️

See the Helios C++ documentation for a more in-depth description of Helios: https://baileylab.ucdavis.edu/software/helios

Quick Start

Installation

Requirements: Python 3.10 or later (pre-built wheels available for Python 3.10–3.14)

Easy Install (Recommended):

pip install pyhelios3d

This installs pre-built PyHelios with platform-appropriate plugins:

  • macOS (Apple Silicon): All plugins including radiation via Vulkan backend
  • macOS (Intel): Pre-built wheels not available - please build from source
  • Windows/Linux: All plugins with GPU acceleration via OptiX backend (NVIDIA GPUs)

PyHelios automatically selects the best execution mode:

  • Plugins with GPU backends (radiation): Require GPU - Vulkan (all platforms) or OptiX (NVIDIA)
  • Plugins with CPU/GPU modes (energybalance): Work on all platforms, GPU acceleration optional
  • CPU-only plugins: Work on all platforms without special hardware

Note for Intel Mac Users: Due to GitHub Actions infrastructure limitations, pre-built wheels are only available for Apple Silicon Macs. Intel Mac users must build PyHelios from source following the macOS build instructions below.

Build from Source {#build-from-source}

If you need to customize plugins or build from source:

Windows {#windows}

Prerequisites:

  • Visual Studio 2019+ or Build Tools for Visual Studio
  • Python 3.10+
# Clone repository
git clone --recursive https://github.com/PlantSimulationLab/PyHelios.git
cd PyHelios/

# Build native libraries (optional - pre-built binaries included)
./build_scripts/build_helios

# Install PyHelios dependencies
pip install -e .

macOS {#macos}

Prerequisites:

  • Xcode command line tools
  • Python 3.10+
# Install Xcode command line tools
xcode-select --install

# Clone repository
git clone --recursive https://github.com/PlantSimulationLab/PyHelios.git
cd PyHelios/

# Install c++ dependencies and build native libraries
source helios-core/utilities/dependencies.sh
./build_scripts/build_helios

# Install PyHelios dependencies
pip install -e .

Linux (Ubuntu/Debian) {#linux}

Prerequisites:

  • Build essentials
  • CMake
  • Python 3.10+
# Clone repository
git clone --recursive https://github.com/PlantSimulationLab/PyHelios.git
cd PyHelios/

# Install c++ dependencies and build native libraries
source helios-core/utilities/dependencies.sh
./build_scripts/build_helios

# Install PyHelios dependencies
pip install -e .

GPU Features Setup (Optional)

PyHelios plugins have three types of GPU support:

GPU-Required Plugins:

  • Radiation Model: GPU-accelerated ray tracing via Vulkan (all GPUs) or OptiX (NVIDIA)
  • Aerial LiDAR: GPU-accelerated LiDAR simulation (CUDA)

GPU-Optional Plugins (work with or without GPU):

  • Energy Balance (v1.3.61+): Automatic mode selection - GPU (CUDA) → OpenMP (parallel CPU) → Serial CPU
    • CPU mode recommended for most workloads without GPU

CPU-Only Plugins (no GPU needed):

  • All other plugins (PlantArchitecture, Photosynthesis, SolarPosition, etc.)

For GPU Acceleration (optional), ensure you have at least one:

  • Vulkan loader library (macOS/Linux only; no extra packages on Windows)
  • OR for NVIDIA-optimized path: CUDA 12.0+ with driver >= 560 (OptiX 8.1) or CUDA 9.0+ with driver < 560 (OptiX 6.5)

The radiation plugin auto-detects the best available backend at runtime (OptiX 8 -> OptiX 6 -> Vulkan).

Verification:

vulkaninfo  # Should show Vulkan device information
# OR for NVIDIA:
nvidia-smi  # Should show GPU information

Testing GPU Features:

from pyhelios import Context, RadiationModel, EnergyBalanceModel

context = Context()

# Test GPU-required plugin (radiation)
try:
    radiation = RadiationModel(context)
    print("GPU radiation modeling available!")
except RuntimeError as e:
    print(f"Radiation requires GPU: {e}")

# Test GPU-optional plugin (energybalance)
with EnergyBalanceModel(context) as energy:
    if energy.isGPUAccelerationEnabled():
        print("EnergyBalance using GPU acceleration")
    else:
        print("EnergyBalance using CPU mode (OpenMP or serial)")

First Example

from pyhelios import Context
from pyhelios.types import *

# Create simulation context
context = Context()

# Add a patch primitive
center = vec3(2, 3, 4)
size = vec2(1, 1)
color = RGBcolor(0.25, 0.25, 0.25)
patch_uuid = context.addPatch(center=center, size=size, color=color)

print(f"Created patch: {patch_uuid}")

Documentation

Section Description
Getting Started Installation, setup, and first steps
User Guide Core concepts, API reference, and examples
Cross-Platform Platform-specific usage and deployment
Plugin System Available plugins and configuration

Key Features

  • Cross-platform: Windows, macOS, and Linux support
  • Plant modeling: 20+ plant species models in the plant architecture plug-in
  • GPU acceleration: Radiation simulation via Vulkan or OptiX backends
  • 3D visualization: OpenGL-based real-time rendering

Updating PyHelios

PyPI Installation

If you installed via pip, simply upgrade to the latest version:

pip install --upgrade pyhelios3d

Source Installation

If you built PyHelios from source, update with the latest changes:

# Update main repository and submodules recursively
git pull --recurse-submodules

# Alternative: Update main repo first, then submodules
git pull
git submodule update --init --recursive

# Rebuild native libraries after updates (recommended)
./build_scripts/build_helios --clean

# Reinstall PyHelios
pip install -e .

Important: Always use --recurse-submodules or manually update submodules when pulling updates, as PyHelios depends on the helios-core submodule for C++ functionality.

Quick Commands

# Test installation (uses subprocess isolation for robust testing)
pytest

# Check plugin status  
python -m pyhelios.plugins status

# Interactive plugin selection
./build_scripts/build_helios --interactive

Support


Note: This project is in active development. The API may change quickly - see docs/CHANGELOG.md for updates.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pyhelios3d-0.1.22-cp314-cp314-win_amd64.whl (52.9 MB view details)

Uploaded CPython 3.14Windows x86-64

pyhelios3d-0.1.22-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (56.0 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64

pyhelios3d-0.1.22-cp314-cp314-macosx_14_0_arm64.whl (62.4 MB view details)

Uploaded CPython 3.14macOS 14.0+ ARM64

pyhelios3d-0.1.22-cp313-cp313-win_amd64.whl (52.6 MB view details)

Uploaded CPython 3.13Windows x86-64

pyhelios3d-0.1.22-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (55.9 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

pyhelios3d-0.1.22-cp313-cp313-macosx_14_0_arm64.whl (62.4 MB view details)

Uploaded CPython 3.13macOS 14.0+ ARM64

pyhelios3d-0.1.22-cp312-cp312-win_amd64.whl (52.6 MB view details)

Uploaded CPython 3.12Windows x86-64

pyhelios3d-0.1.22-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (55.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

pyhelios3d-0.1.22-cp312-cp312-macosx_14_0_arm64.whl (62.4 MB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

pyhelios3d-0.1.22-cp311-cp311-win_amd64.whl (52.6 MB view details)

Uploaded CPython 3.11Windows x86-64

pyhelios3d-0.1.22-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (55.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

pyhelios3d-0.1.22-cp311-cp311-macosx_14_0_arm64.whl (62.4 MB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

pyhelios3d-0.1.22-cp310-cp310-win_amd64.whl (52.6 MB view details)

Uploaded CPython 3.10Windows x86-64

pyhelios3d-0.1.22-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (55.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

pyhelios3d-0.1.22-cp310-cp310-macosx_14_0_arm64.whl (62.4 MB view details)

Uploaded CPython 3.10macOS 14.0+ ARM64

File details

Details for the file pyhelios3d-0.1.22-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: pyhelios3d-0.1.22-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 52.9 MB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyhelios3d-0.1.22-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 e72d23ecda3e5c2a9fd8fc9f67fbd2e0c81c4a6f48a0189c74cf6c9b2130ccfc
MD5 ada85f0512451865755fa55c6a88169b
BLAKE2b-256 d83370c025ee781763375a5b99866989aa1964745e004b69a65395b31e3a79c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyhelios3d-0.1.22-cp314-cp314-win_amd64.whl:

Publisher: build-wheels.yml on PlantSimulationLab/PyHelios

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyhelios3d-0.1.22-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for pyhelios3d-0.1.22-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 72f1c831c7a8c75052cd7614f079984d520e2e48177f9c5750c19c91b765c0da
MD5 f6f6f6feb398294b76a832ce98f48788
BLAKE2b-256 3dcbcde902d0b66382209b4ebfb888be8730d5ec741de8706665eb35d5de7ecf

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyhelios3d-0.1.22-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: build-wheels.yml on PlantSimulationLab/PyHelios

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyhelios3d-0.1.22-cp314-cp314-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for pyhelios3d-0.1.22-cp314-cp314-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 05587c74a267966907e6b3b51f942d23376d23994320a165b1a9a2ed3d3e8ce6
MD5 38a2a12a65126204728e175250a789fe
BLAKE2b-256 355cae4bb5f6eaa93a03b91aef26c3aa5a4a1745299e352ea90ea965f4362d75

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyhelios3d-0.1.22-cp314-cp314-macosx_14_0_arm64.whl:

Publisher: build-wheels.yml on PlantSimulationLab/PyHelios

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyhelios3d-0.1.22-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: pyhelios3d-0.1.22-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 52.6 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyhelios3d-0.1.22-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 d4ab100e24608e534ce34c25bbe94a4b99a8cc00a6bf28e287db1b37df2a2aaa
MD5 2d3d3577a610810b2dcc15e0d0d818e0
BLAKE2b-256 17763dbf662e9877b9319ccc4897e0f6dd5845a40fa00a515fbd5fadf2b93e6d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyhelios3d-0.1.22-cp313-cp313-win_amd64.whl:

Publisher: build-wheels.yml on PlantSimulationLab/PyHelios

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyhelios3d-0.1.22-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for pyhelios3d-0.1.22-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 2614e929418abb54391cbf75d9f7850fa24c2c1be610298eea6231ac6deca22c
MD5 81781b96519c844e3d0eed62c756c854
BLAKE2b-256 2561407e0cf3360d3f831b93c4706a6b6f25334b15e59d2a8dce5c9ecca22654

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyhelios3d-0.1.22-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: build-wheels.yml on PlantSimulationLab/PyHelios

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyhelios3d-0.1.22-cp313-cp313-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for pyhelios3d-0.1.22-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 36bcac2be488a3baa0222aef306ab2353de4984756c4941f5ecac0a9ca9c2ff8
MD5 d79728369fd074e4e971a3c48d106dfb
BLAKE2b-256 fa02111c7f397f2ec44b08ee015c3bfbb1864c0dd2e49a3e2b3f8b500b57e930

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyhelios3d-0.1.22-cp313-cp313-macosx_14_0_arm64.whl:

Publisher: build-wheels.yml on PlantSimulationLab/PyHelios

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyhelios3d-0.1.22-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: pyhelios3d-0.1.22-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 52.6 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyhelios3d-0.1.22-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 6577e007a45697de2e19ea7e08c2bca1a10bd4989d8ad29868823720e9be6397
MD5 a1aaf803030bc96812ba2aad55d91c18
BLAKE2b-256 680df22a7115acfabd0baa5526614296baa64ba015960790bb72cdcadf41fc2b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyhelios3d-0.1.22-cp312-cp312-win_amd64.whl:

Publisher: build-wheels.yml on PlantSimulationLab/PyHelios

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyhelios3d-0.1.22-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for pyhelios3d-0.1.22-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 5fae915760a5982f6eee0ef0ca2629e751963714d6d3b3face55878de8648291
MD5 72601bc6e9fc9c1c4a5d28389a060769
BLAKE2b-256 362085b5644fbd1347eee9091d347d90b4afab001d25888a03f201915dda280a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyhelios3d-0.1.22-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: build-wheels.yml on PlantSimulationLab/PyHelios

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyhelios3d-0.1.22-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for pyhelios3d-0.1.22-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 87628055aa3118a22ac63df5638e96b177883a72c1e0d2c8a73ebb330eb586e6
MD5 c9825df4d368c1e650dd1f7017700a51
BLAKE2b-256 88bd740a00fbcf874c82d0f17c15960c462504a3d5b3296a03fb6468f3a71e8f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyhelios3d-0.1.22-cp312-cp312-macosx_14_0_arm64.whl:

Publisher: build-wheels.yml on PlantSimulationLab/PyHelios

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyhelios3d-0.1.22-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: pyhelios3d-0.1.22-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 52.6 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyhelios3d-0.1.22-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a8cb72772ceaeeb9b7ce73b630f53055e366e304cda91d48fdd95bc167fc014e
MD5 ac61e571308329397415dcbb8fdbbba2
BLAKE2b-256 6bb2298864914f52de5bcfcaf51cbab840fb9c27079c4df62db520d6ce34a0a3

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyhelios3d-0.1.22-cp311-cp311-win_amd64.whl:

Publisher: build-wheels.yml on PlantSimulationLab/PyHelios

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyhelios3d-0.1.22-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for pyhelios3d-0.1.22-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 d7f9cf881d48d25c083c7279ac15e529bb986fd2215eea4ce1c76abd92b311a5
MD5 38ab5ff52b626d95fbbf8e6d715b55d6
BLAKE2b-256 d775d5641fff1b993071128b5bdb7ab655899c43347c51bddd8293d5057105ff

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyhelios3d-0.1.22-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: build-wheels.yml on PlantSimulationLab/PyHelios

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyhelios3d-0.1.22-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for pyhelios3d-0.1.22-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 626c4d6def7c99b7a785badae5e2be78260ddccb824f8b5990908271b6a6cd1a
MD5 1821a3fcc124eced07c9ccc0111a7cef
BLAKE2b-256 c1a9c23324e049cac8c92169ac67e7e31cf746e6e0269f88d842b117497b02b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyhelios3d-0.1.22-cp311-cp311-macosx_14_0_arm64.whl:

Publisher: build-wheels.yml on PlantSimulationLab/PyHelios

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyhelios3d-0.1.22-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: pyhelios3d-0.1.22-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 52.6 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyhelios3d-0.1.22-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 4909ab5977c069e21377e85a6bfefc6fd8294190f3d778a6d92c6730f0e4bc7d
MD5 ae7fc1e1c9abcdae4aced79c078ac245
BLAKE2b-256 d60e0001225e15760868c5422decbd90c9f72d7261f8dfaf2e4dd37d184f7fc9

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyhelios3d-0.1.22-cp310-cp310-win_amd64.whl:

Publisher: build-wheels.yml on PlantSimulationLab/PyHelios

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyhelios3d-0.1.22-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for pyhelios3d-0.1.22-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 3254da48d41ad1af0f4c65210a3b7367f68953bad1199e9d6f9803df1adc8fe6
MD5 0908298f2c457396020e2604aad45273
BLAKE2b-256 7a7546a68b0b2f0a4e6a6bfcf8bc7308f0b3d6906d7710a0350af4afd700889a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyhelios3d-0.1.22-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: build-wheels.yml on PlantSimulationLab/PyHelios

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyhelios3d-0.1.22-cp310-cp310-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for pyhelios3d-0.1.22-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 ff9c75d63847a21267bced35161017a8a4ed99043e6b669fb81ed79797873c3f
MD5 9a45f0f75b1a5198b67b7cb71795a463
BLAKE2b-256 1a46bc3dc75b051ecd0fa1832e9ff397b175edb4dd19e70e4e6240fc374eefd3

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyhelios3d-0.1.22-cp310-cp310-macosx_14_0_arm64.whl:

Publisher: build-wheels.yml on PlantSimulationLab/PyHelios

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page