Debian Codegraph @

docs/requirements-and-installation.md

raw symbols SCIP
1 ---
2 title: Installation
3 hide:
4 - tags
5 tags:
6 - Installation
7 ---
8
9 <!--
10 ~ Copyright (c) 2023-2026 Arista Networks, Inc.
11 ~ Use of this source code is governed by the Apache License 2.0
12 ~ that can be found in the LICENSE file.
13 -->
14
15 ## Python version
16
17 Python 3 (`>=3.10`) is required:
18
19 ```bash
20 python --version
21 Python 3.11.8
22 ```
23
24 ## Install ANTA package
25
26 This installation will deploy the test collection, scripts, and all their Python requirements.
27
28 The ANTA package and the cli require some packages that are not part of the Python standard library. They are indicated in the [pyproject.toml](https://github.com/aristanetworks/anta/blob/main/pyproject.toml) file, under dependencies.
29
30 ### Install library from Pypi server
31
32 ```bash
33 pip install anta
34 ```
35
36 !!! warning
37 This command alone **will not** install the ANTA CLI requirements.
38
39 ### Install ANTA CLI as an application with `pipx`
40
41 [`pipx`](https://pipx.pypa.io/stable/) is a tool to install and run Python applications in isolated environments. If you plan to use ANTA only as a CLI tool you can use `pipx` to install it. `pipx` installs ANTA in an isolated Python environment and makes it available globally.
42
43 ```bash
44 pipx install anta[cli]
45 ```
46
47 !!! info
48 Please take the time to read through the installation instructions of `pipx` before getting started.
49
50 ### Install CLI from Pypi server
51
52 Alternatively, pip install with `cli` extra is enough to install the ANTA CLI.
53
54 ```bash
55 pip install anta[cli]
56 ```
57
58 ### Install ANTA from GitHub
59
60 ```bash
61 pip install git+https://github.com/aristanetworks/anta.git
62 pip install git+https://github.com/aristanetworks/anta.git#egg=anta[cli]
63
64 # You can even specify the branch, tag or commit:
65 pip install git+https://github.com/aristanetworks/anta.git@<cool-feature-branch>
66 pip install git+https://github.com/aristanetworks/anta.git@<cool-feature-branch>#egg=anta[cli]
67
68 pip install git+https://github.com/aristanetworks/anta.git@<cool-tag>
69 pip install git+https://github.com/aristanetworks/anta.git@<cool-tag>#egg=anta[cli]
70
71 pip install git+https://github.com/aristanetworks/anta.git@<more-or-less-cool-hash>
72 pip install git+https://github.com/aristanetworks/anta.git@<more-or-less-cool-hash>#egg=anta[cli]
73 ```
74
75 ### Check installation
76
77 After installing ANTA, verify the installation with the following commands:
78
79 ```bash
80 # Check ANTA has been installed in your python path
81 pip list | grep anta
82
83 # Check scripts are in your $PATH
84 # Path may differ but it means CLI is in your path
85 which anta
86 /home/tom/.pyenv/shims/anta
87 ```
88
89 !!! warning
90 Before running the `anta --version` command, please be aware that some users have reported issues related to the `urllib3` package. If you encounter an error at this step, please refer to our [FAQ](faq.md) page for guidance on resolving it.
91
92 ```bash
93 # Check ANTA version
94 anta --version
95 anta, version v1.9.0
96 ```
97
98 ## EOS Requirements
99
100 To get ANTA working, the targeted Arista EOS devices must have eAPI enabled. They need to use the following configuration (assuming you connect to the device using Management interface in MGMT VRF):
101
102 ```eos
103 configure
104 !
105 vrf instance MGMT
106 !
107 interface Management1
108 description oob_management
109 vrf MGMT
110 ip address 10.73.1.105/24
111 !
112 end
113 ```
114
115 Enable eAPI on the MGMT vrf:
116
117 ```eos
118 configure
119 !
120 management api http-commands
121 protocol https port 443
122 no shutdown
123 vrf MGMT
124 no shutdown
125 !
126 end
127 ```
128
129 Now the switch accepts on port 443 in the MGMT VRF HTTPS requests containing a list of CLI commands.
130
131 Run these EOS commands to verify:
132
133 ```eos
134 show management http-server
135 show management api http-commands
136 ```