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; runpython -m pip --versionin a terminal to check)- A valid ASReml license (contact VSN International for details)
Installation
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/activateStep 2: Install ASReml for Python
The package can be installed directly from the repository using pip. Choose the variant that best suits your needs:
- Basic installation (no plotting support):
python -m pip install --extra-index-url https://products.vsni.co.uk/asreml/python-package asreml- 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]"- 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 asremlStep 3: Activate License
If license activation is required, run the following command:
python <LOCATION>/asreml/get_license.py YYYY-YYYY-YYYY-YYYYWhere:
<LOCATION>is the location into which the asreml package was installed, as shown when runningpip show asreml.YYYY-YYYY-YYYY-YYYYis 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"' >> ~/.bashrcor ~/.zshrc on macOS:
echo 'export VSN_USER_LICPATH="PATH_TO_LICENSE"' >> ~/.zshrcTry loading ASReml again after setting the environment variable.
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.ps1Step 2: Install ASReml for Python
The package can be installed directly from the repository using pip. Choose the variant that best suits your needs:
- Basic installation (no plotting support):
python -m pip install --extra-index-url https://products.vsni.co.uk/asreml/python-package asreml- 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]"- 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 asremlStep 3: Activate License
If license activation is required, run the following command:
python <LOCATION>\asreml\get_license.py YYYY-YYYY-YYYY-YYYYWhere:
<LOCATION>is the location into which the asreml package was installed, as shown when runningpip show asreml.YYYY-YYYY-YYYY-YYYYis 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.