This lesson is part of the Network Configuration with Scrapli Course.
In this lesson, we will cover:
- How to install Scrapli.
- How to validate your Scrapli installation.
You can find the scripts and code for this lesson within the Scrapli repo under the directory: 001_scrapli_fundamentals/.
Note: The steps in this lesson are also included in the next lesson, where we install the hands-on environment for this course. In other words, this lesson is for anyone wanting to install Scrapli on its own. Therefore, feel free to move directly to the next lesson.
Create Virtual Environment
Before installing Scrapli, we will create a virtual environment in which we will install Scrapli. By installing Scrapli 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 new venv directory
mkdir venv
# Create a virtual environment
python3 -m venv venv/venv-scrapli
# Activate the virtual environment
source venv/venv-scrapli/bin/activate
Install Scrapli Core
Now we are inside our newly created virtual environment, we can install Scrapli. But first, let’s look at some of the ways Scrapli can be installed.
Scrapli Core – No Dependencies
To install only Scrapli Core, with no additional dependencies. If we only require Scrapli Core using the default system
transport, we can perform:
$ pip3 install scrapli