Need expert statistical support?

More Info

ASReml for Python Installation Guide

The following is a guide on how to install ASReml for Python.

Requirements

ASReml for Python requires:

  • Python 3.8 or later
  • pip (included with most Python installations; run python -m pip --version in a terminal to check)
  • A valid ASReml license (contact VSN International for details)

Installation

Note

All commands below are run in a terminal.

Step 1: Create Virtual Environment (optional)

Create a virtual environment in a directory of choice:

python -m venv my_env
source ./my_env/bin/activate

Step 2: Install ASReml for Python

The package can be installed directly from the repository using pip. Choose the variant that best suits your needs:

  1. Basic installation (no plotting support):
python -m pip install --extra-index-url https://products.vsni.co.uk/asreml/python-package asreml
  1. With basic plotting support (excludes exporting plots to file):
python -m pip install --extra-index-url https://products.vsni.co.uk/asreml/python-package "asreml[plots]"
  1. Everything, including exporting plots to file (recommended):
python -m pip install --extra-index-url https://products.vsni.co.uk/asreml/python-package "asreml[full]"

Verify the installation:

python -m pip show asreml

Step 3: Activate License

If license activation is required, run the following command:

python <LOCATION>/asreml/get_license.py YYYY-YYYY-YYYY-YYYY

Where:

  • <LOCATION> is the location into which the asreml package was installed, as shown when running pip show asreml.
  • YYYY-YYYY-YYYY-YYYY is your license key.

This should create a .lic file under VSNi/enterprise_licenses in the current user’s home directory.

Try loading ASReml:

python -c "import asreml"

If the license is not found, set the VSN_USER_LICPATH environment variable to the directory containing the license file:

export VSN_USER_LICPATH="PATH_TO_LICENSE"

To make it permanent, append it to your shell’s startup file, ~/.bashrc on most Linux systems:

echo 'export VSN_USER_LICPATH="PATH_TO_LICENSE"' >> ~/.bashrc

or ~/.zshrc on macOS:

echo 'export VSN_USER_LICPATH="PATH_TO_LICENSE"' >> ~/.zshrc

Try loading ASReml again after setting the environment variable.

Note

All commands below are run in a PowerShell terminal.

Step 1: Create Virtual Environment (optional)

Create a virtual environment in a directory of choice:

python -m venv my_env
.\my_env\Scripts\Activate.ps1

Step 2: Install ASReml for Python

The package can be installed directly from the repository using pip. Choose the variant that best suits your needs:

  1. Basic installation (no plotting support):
python -m pip install --extra-index-url https://products.vsni.co.uk/asreml/python-package asreml
  1. With basic plotting support (excludes exporting plots to file):
python -m pip install --extra-index-url https://products.vsni.co.uk/asreml/python-package "asreml[plots]"
  1. Everything, including exporting plots to file (recommended):
python -m pip install --extra-index-url https://products.vsni.co.uk/asreml/python-package "asreml[full]"

Verify the installation:

python -m pip show asreml

Step 3: Activate License

If license activation is required, run the following command:

python <LOCATION>\asreml\get_license.py YYYY-YYYY-YYYY-YYYY

Where:

  • <LOCATION> is the location into which the asreml package was installed, as shown when running pip show asreml.
  • YYYY-YYYY-YYYY-YYYY is your license key.

This should create a .lic file under VSNi/enterprise_licenses in the current user’s home directory.

Try loading ASReml:

python -c "import asreml"

If the license is not found, set the VSN_USER_LICPATH environment variable to the directory containing the license file:

$env:VSN_USER_LICPATH = "PATH_TO_LICENSE"

To make it permanent:

[Environment]::SetEnvironmentVariable("VSN_USER_LICPATH", "PATH_TO_LICENSE", "User")

Try loading ASReml again after setting the environment variable.

Want to sharpen your statistics skills?

Browse Courses