Setting up the environment for this tutorial
Cloning and setting up this repository
Clone this repository:
$ git clone https://github.com/brunorijsman/yang-tutorial.git Cloning into 'yang-tutorial'... remote: Enumerating objects: 32, done. remote: Counting objects: 100% (32/32), done. remote: Compressing objects: 100% (21/21), done. remote: Total 32 (delta 8), reused 29 (delta 5), pack-reused 0 Unpacking objects: 100% (32/32), 848.05 KiB | 1.58 MiB/s, done.
In the remainder of this tutorial I will assume that you cloned the repository into your home
directory. If not, replace ~ with whatever directory you cloned the repository into.
Setting up a python virtual environment
Make sure that we have version 3.8 or higher of Python installed:
$ python3 --version Python 3.8.10
Create a Python virtual environment:
$ cd yang-tutorial $ python3 -m venv venv
Activate the Python virtual environment:
$ source venv/bin/activate (venv) $
Install the Python dependencies:
$ pip install -r requirements.txt Collecting lxml==4.8.0 Using cached lxml-4.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (6.9 MB) Collecting pyang==2.5.2 Using cached pyang-2.5.2-py2.py3-none-any.whl (595 kB) Installing collected packages: lxml, pyang Successfully installed lxml-4.8.0 pyang-2.5.2