Installation#
WindKit is distributed via conda and PyPI. Due to dependencies on GIS utilities (GeoPandas, Rasterio) that require C libraries (GDAL, GEOS, PROJ), we recommend installing via conda for the smoothest experience.
Platform Support#
Platform |
Status |
Notes |
|---|---|---|
Linux / WSL |
Supported |
Recommended platform |
Windows |
Supported |
|
macOS |
Supported |
Prerequisites#
Before installing, ensure you have:
Quick Install#
For experienced users, here are the essential commands:
mamba create -n windkit -c https://conda.windenergy.dtu.dk/channel/open/ -c conda-forge windkit
mamba activate windkit
pixi init && pixi project channel add https://conda.windenergy.dtu.dk/channel/open/
pixi add windkit
pip install windkit
Detailed Installation#
Step 1: Install a package manager
We recommend Miniforge,
which provides both conda and the faster mamba.
Linux:
wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh
bash Miniforge3-Linux-x86_64.sh
Follow the prompts and restart your terminal.
Note
Windows users
Download and run the latest Windows installer from
Miniforge releases.
Use the default options, then open Miniforge Prompt from the Start menu.
To use PowerShell instead, run conda init powershell and restart PowerShell.
Step 2: Create environment and install WindKit
mamba create -n windkit -c https://conda.windenergy.dtu.dk/channel/open/ -c conda-forge windkit
Step 3: Activate and verify
mamba activate windkit
python -c "import windkit; print(windkit.__version__)"
Pixi is a modern, fast package manager for project-based dependency management.
Step 1: Install pixi
Follow the instructions at pixi.sh.
Step 2: Create a project
mkdir my-windkit-project
cd my-windkit-project
pixi init
Step 3: Add channels and install WindKit
pixi project channel add https://conda.windenergy.dtu.dk/channel/open/
pixi add windkit
Step 4: Verify installation
pixi run python -c "import windkit; print(windkit.__version__)"
To work interactively, use pixi shell to enter the environment.
Warning
PyPI installation requires you to install C library dependencies (GDAL, GEOS, PROJ) yourself. We recommend conda for easier setup.
Using pip:
pip install windkit
Using uv (faster alternative):
uv venv && source .venv/bin/activate
uv pip install windkit
With optional dependencies:
pip install windkit[plots,data_apis,performance]
Post-Installation Setup#
Configure WindKit (optional)
WindKit can be configured via a TOML file or environment variables. See the Configuration.
Save channel credentials (optional, conda/mamba only)
To avoid typing channel URLs for future installs:
mamba config --add channels https://conda.windenergy.dtu.dk/channel/open/
mamba config --add channels conda-forge
Updating WindKit#
We recommend creating a new environment for major updates:
mamba create -n windkit_new -c https://conda.windenergy.dtu.dk/channel/open/ -c conda-forge windkit
pixi update
pip install --upgrade windkit
Troubleshooting#
Import errors
ModuleNotFoundError: No module named ‘windkit’
Ensure your environment is activated:
mamba activate windkit # or: pixi shell
ImportError: DLL load failed (Windows)
Try reinstalling in a fresh environment:
mamba create -n windkit_fresh -c https://conda.windenergy.dtu.dk/channel/open/ -c conda-forge windkit
Dependencies#
Required dependencies
geopandas (1.0+) - Spatial data handling
netcdf4 (1.6+) - NetCDF file I/O
numpy (1.26+) - Numerical arrays
pandas (2.1+) - Data structures
pyproj (3.6+) - Coordinate transforms
rasterio (1.3+) - Raster I/O
rioxarray (0.17+) - Rasterio xarray extension
scipy (1.12+) - Scientific computing
xarray (2023.9+) - Labeled arrays
h5netcdf - Alternative NetCDF backend
lxml (5.0+) - XML processing
packaging - Version parsing
platformdirs - Platform directories
pydantic (2.7+) - Data validation
pydantic-settings (2.3+) - Settings management
requests - HTTP client
shapely (2.0+) - Geometric operations
toml - TOML parsing
Optional dependencies
Plotting (windkit[plots]):
matplotlib (3.8+) - Static plots
plotly (5.12+) - Interactive plots
kaleido - Export plotly images
Data APIs (windkit[data_apis]):
adlfs - Azure storage access
earthengine-api - Google Earth Engine
fsspec - File system interface
planetary-computer - Microsoft Planetary Computer
pystac-client - STAC catalogs
zarr - Chunked array storage
Performance (windkit[performance]):
numba (0.57+) - JIT compilation for faster functions
Need Help?#
If you encounter issues not covered here:
Visit the WAsP Forum
Email us at pywasp@dtu.dk
See also
Introduction - Get started with WindKit
Tutorial Data - Tutorial datasets