Installation
The PyWAsP system is distributed through the conda package, dependency, and environment manager via DTU Wind Energy’s WAsP Conda Channel.
Note
Before you can download the software, you will need an access token for the software, and access to the DTU Wind Energy license server.
Currently, PyWAsP can be installed on Linux and Windows systems. However, the windows installation is considered experimental at this stage, so we recommend to install PyWAsP on windows via WSL. In the future we expect full support for installation on Windows and MacOS as well.
conda/mamba
To install PyWAsP on Linux, you first need a package manager. We recommend Miniforge:
Miniforge provides both
conda
and the fastermamba
commands:Linux
wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh bash Miniforge3-Linux-x86_64.shFollow the instructions and restart your terminal to activate the base environment.
Windows
Go to https://github.com/conda-forge/miniforge and download and run the latest
.exe
installer for windows.Complete the installation using the “default” option and follow the instructions. Then open the “miniforge” prompt which is installed with the miniforge.
If you prefer to use powershell, run the command:
conda init powershellNow open powershell, which should now have an activate conda environment.
Install PyWAsP using
mamba
(recommended for speed) orconda
by creating a new environment. Replace<env_name>
with your desired environment name:
mamba create -c https://<user>:<token>@conda.windenergy.dtu.dk/channel/wasp -n <env_name> pywaspHere,
<user>
and<token>
are your credentials from the license email.Note
The Python source code and binaries are installed into a folder in the distribution you installed. For example, if you installed Miniforge, the source code is located in
<path>/miniforge/envs/<env_name>
. Where <path> is the path to the folder where you installed Miniforge, and <env_name> is the name of the environment you created.
Optionally, you can add the WAsP Conda channel to your conda configuration to simplify future installations.:
Replace
<user>
and<token>
with the credentials from your license email:mamba config --add channels https://<user>:<token>@conda.windenergy.dtu.dk/channel/waspVerify your channels are configured correctly:
mamba config --show channelsYou should see:
channels: - conda-forge - https://<user>:<token>@conda.windenergy.dtu.dk/channel/waspNow you can install PyWAsP in any new environment without specifying the channel again:
mamba create -n <env_name> pywaspIf other channels exist and you run into issues, you can try to remove those additional channels to prevent package conflicts:
mamba config --remove channels <channel_name>
Activate your environment:
mamba activate <env_name>
Verify your installation:
python -c "import pywasp; print(pywasp.__version__)"
Optionally, configure PyWAsP interactively by running:
python -c "import pywasp as pw; pw.user_config.create_config_interactively()"You’ll be prompted for licensing details. For more information, see the User Config section.
If you’re new to PyWAsP, explore our Tutorials and Examples.
pixi
Pixi is a modern package manager that provides a fast and reliable way to manage dependencies and environments.
First, install pixi by following the instructions at https://pixi.sh/.
Create a new pixi project or add PyWAsP to an existing project:
mkdir my-pywasp-project # (if you don't have a project yet) cd my-pywasp-project pixi init
Add the WAsP conda channel and install PyWAsP:
pixi project channel add https://<user>:<token>@conda.windenergy.dtu.dk/channel/wasp pixi add pywasp
Here,
<user>
and<token>
are your credentials from the license email.Run PyWAsP in the pixi environment:
pixi run python -c "import pywasp; print(pywasp.__version__)"
To work interactively with PyWAsP, start a shell in the pixi environment:
pixi shell
Configure PyWAsP interactively (optional):
pixi run python -c "import pywasp as pw; pw.user_config.create_config_interactively()"
For more information, see the User Config section.
MacOS
Warning
Installation on MacOS is currently not supported. But, look for it in future releases!
Installing a newer version of PyWAsP
The PyWAsP package is updated regularly. To update your installation to the latest version we recommend installing a new environment with the latest version of PyWAsP by following the installation instructions above and giving the new environment a new name.
If you use pixi, you can update your existing project by running:
pixi update
This will update all packages in your project to the latest versions available in the channels you have configured.
PyWAsP versions and backwards compatibility
PyWAsP versions are numbered according to the EffVer approach, which is versioning scheme which signals the effort required to upgrade to a new version. Generally, we try to avoid breaking changes, but we dont promise it, and recommend pinning the version of PyWAsP you use in your projects to avoid unexpected changes in behavior.