Installation#

PyWAsP is distributed via DTU Wind Energy’s WAsP Conda Channel and requires a license to run.

Platform Support#

Platform

Status

Notes

Linux / WSL

Supported

Recommended platform

Windows

Supported

macOS

Not supported

Planned for future releases


Prerequisites#

Before installing, ensure you have:

License & Credentials

You need a PyWAsP license and access credentials (username and token) from DTU Wind Energy. These are provided in your license email.

Order PyWAsP

Network Access

PyWAsP requires network access to the DTU license server for license validation. Ensure outbound HTTPS connections are allowed.


Quick Install#

For experienced users, here are the essential commands:

mamba create -n pywasp -c https://<user>:<token>@conda.windenergy.dtu.dk/channel/wasp pywasp
mamba activate pywasp
pixi init && pixi project channel add https://<user>:<token>@conda.windenergy.dtu.dk/channel/wasp
pixi add pywasp

Replace <user> and <token> with your credentials from the license email.


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 PyWAsP

mamba create -n pywasp -c https://<user>:<token>@conda.windenergy.dtu.dk/channel/wasp pywasp

Step 3: Activate and verify

mamba activate pywasp
python -c "import pywasp; print(pywasp.__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-pywasp-project
cd my-pywasp-project
pixi init

Step 3: Add the WAsP channel and install PyWAsP

pixi project channel add https://<user>:<token>@conda.windenergy.dtu.dk/channel/wasp
pixi add pywasp

Step 4: Verify installation

pixi run python -c "import pywasp; print(pywasp.__version__)"

To work interactively, use pixi shell to enter the environment.


Post-Installation Setup#

Configure your license

Run the interactive configuration from an activated pywasp environment to set up your license:

pywasp configure

Check license status

To view your license status and remaining runs:

pywasp status

See User Config for more details.

Save channel credentials (optional, conda/mamba only)

To avoid typing credentials for future installs:

mamba config --add channels https://<user>:<token>@conda.windenergy.dtu.dk/channel/wasp

The first time you run pywasp#

Downloading data files

The first time you run PyWAsP, it will attempt to download data files needed for some of its functions. Depending on what you chose during configuration, it may prompt you for accepting this or not. We recommend always running Python and importing pywasp in shell the first time for this step.


Updating PyWAsP#

We recommend creating a new environment for major updates:

mamba create -n pywasp_new -c https://<user>:<token>@conda.windenergy.dtu.dk/channel/wasp pywasp
pixi update

Troubleshooting#

Import errors

ModuleNotFoundError: No module named ‘pywasp’

Ensure your environment is activated:

mamba activate pywasp  # or: pixi shell

ImportError: DLL load failed (Windows)

Try reinstalling in a fresh environment:

mamba create -n pywasp_fresh -c https://<user>:<token>@conda.windenergy.dtu.dk/channel/wasp pywasp
License errors

LicenseError: No valid license found

  1. Configure PyWAsP with your license:

    pywasp configure
    
  2. Check remaining runs:

    pywasp status
    
  3. Verify network access to the license server.

LicenseError: License server connection failed

Check firewall settings and ensure outbound HTTPS is allowed.

Channel authentication errors

CondaHTTPError: HTTP 401 UNAUTHORIZED

Verify your credentials are correct:

mamba config --show channels

Re-add with correct credentials if needed:

mamba config --remove channels https://...@conda.windenergy.dtu.dk/channel/wasp
mamba config --add channels https://<user>:<token>@conda.windenergy.dtu.dk/channel/wasp
SSL certificate errors (corporate networks)

If you see SSL: CERTIFICATE_VERIFY_FAILED or license server trust errors, your network may use a custom Certificate Authority.

  1. Get the CA certificate (.pem file) from your IT administrator

  2. Find your PyWAsP config file:

    import pywasp
    pywasp.user_config.get_config_filepath()
    
  3. Add to the [licensing] section:

    root_ca_filepath = /path/to/your/ca-certificate.pem
    

See User Config for more details. You can also run pywasp configure and set the root_ca_filepath when prompted.

Downloading data files fails

PyWAsP downloads global NetCDF files on first import for baroclinicity, stability, and air density calculations. If this fails (e.g., firewall restrictions, no internet), you can download and install them manually.

Get the files from Zenodo and place them in the correct directory. See Manually downloading data files for download links and file locations.


Dependencies#

PyWAsP depends on WindKit and includes all WindKit dependencies plus additional packages for WAsP modelling.

Required dependencies

Need Help?#

If you encounter issues not covered here:

See also