Installation
WindKit is distributed as both pypi and conda packages. However, due to dependencies on several GIS utilities (GeoPandas, Rasterio), which depend on large C based libraries (GEOS, GDAL, PROJ), we recommend installing using the conda packages whenever possible.
Conda installation
About Conda
Conda is a package manager that is able to use many different sources of packages. WindKit’s dependencies require the use of the conda-forge channel, which is a community effort to provide conda packages for a wide range of software. WindKit itself is currently only distributed through specific DTU Wind Energy channels
Instructions
To install WindKit you need to first install the conda package manager. This is done by installing a conda based distribution. We have been using the Mambaforge distribution with great success, and recommend it, but other Conda based distributions will work as well.
After you have installed a conda distribution, you will need to add the DTU Wind Energy Open Conda Channel, and if not using a forge based distribution, you will also need to add the conda-forge channel.
The easiest way to do so is via the command prompt.
On Linux and macOS, open a terminal that has conda configured. On Windows, you will find an entry called the Anaconda Prompt, which will setup the necessary environment for configuring conda.
Run the commands below to add the channels globally so you can use them for all conda environments:
conda config --add channels https://conda.windenergy.dtu.dk/channel/open/ conda config --add channels conda-forge
Now you can setup a new conda environment that has WindKit installed. We recommend that you always create a new environment. This helps to prevent the mixing of different channels packages, and allows for easy testing of different versions:
conda create -n <env_name> windkit <other_libraries>
This command will find the latest version of all of WindKit’s dependencies and install them along with WindKit in an environment named env_name. You can add other dependencies as a space-separated list.
After creating the new environment, you can change to it using the conda activate command:
conda activate <env_name>
Installing with pip
WindKit can also be installed with pip, by default its plotting dependencies are not included:
pip install windkit
To install with plotting dependencies use:
pip install windkit[plots]
As noted above, you may run into issues with using the pip installer, please see the installation instructions for GeoPandas and Rasterio to find the best installation method for your platform.
Dependencies
Required dependencies:
- Plotting dependencies (optional):
kaleido (Used to export plotly images to file)
- Optional dependencies:
numba (Used to speed up some functions)
earthengine-api (Google Earth Engine: provides access to geospatial data from google. Non-commercial uses only.)
planetary-computer (Microsoft Planetary Computer: provides access to geospatial and atmospheric data from Microsoft. Terms of use apply.)
pystac-client (Used to access SpatioTemporal Asset Catalogs (STAC) data on Microsofts Planetary Computer)
fsspec (Used for accessing ERA5 data from the Planetary Computer)
adlfs (Used for accessing ERA5 data from the Planetary Computer)