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]==22.2"
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 22.2 would relate to the 2022 Jan 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==22.2 pyats==22.2
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 22.2 genie.libs.clean 22.2 ...
You can then choose to update your pyATS installation to the latest versions by running:
$ pyats version update Checking your current environment...