In this lesson, we will cover:
- How to install pyATS.
- The main requirements of pyATS.
- How to validate your installation.
- How to check for new pyATS versions and upgrade our installation.
First, let’s cover the requirements of pyATS. The main requirements you should be aware of are:
- Python 3.5+ must be used.
- Installation only supports a Linux based OS. If you are using Windows, you can use WSL2, which works great.
You can find the full requirements here.
Create Virtual Environment
Before installing pyATS, we will create a virtual environment in which we will install pyATS. By installing pyATS within a virtual environment, we can ensure it (and all of its dependencies) are isolated from any other Python packages installed on the system.
# Create a virtual environment python3 -m venv venv # Activate the virtual environment source venv/bin/activate
Now we are inside our newly created virtual environment; we can install pyATS like so:
pip3 install "pyats[full]==21.4"
It is worth mentioning that pyATS uses CalVer for its versioning.
CalVer is a versioning convention based on your project's release calendar instead of arbitrary numbers.
Therefore a version of 21.4 would relate to the 2021 April release. The release cycle of pyATS/Genie is typically 6-8 weeks.
To validate that PyATS and Genie have been correctly installed, we can perform the following:
$ pip3 freeze | grep -E "pyats=|genie=" genie==21.4 pyats==21.4
Version Check and Update
Once installed, you can check to see if any components of your pyATS installation are outdated. Like so:
$ pyats version check --outdated ... Checking for outdated packages... Package Version Latest ---------------------------- ------- ------ genie 21.4 genie.libs.clean 21.4 ...
You can then choose to update your pyATS installation to the latest versions by running:
$ pyats version update Checking your current environment...