Yêu cầu:
1. Cài đặt thư viện Netmiko
2. Cài đặt ntc-templates
3. Jinja2 template
4. Một số thư viện hay dùng
5. Kiểm tra các thư viện đã cài đặt trên python
Thực hiện:
1. Cài đặt thư viện Netmiko: Dùng để cài đặt và thiết lập kết nối ssh vào thiết bị
C:\Users\Admin\Downloads>pip install netmiko
Collecting netmiko
Using cached netmiko-3.1.1-py2.py3-none-any.whl (147 kB)
Collecting pyserial
Using cached pyserial-3.4-py2.py3-none-any.whl (193 kB)
Collecting scp>=0.13.2
Using cached scp-0.13.2-py2.py3-none-any.whl (9.5 kB)
Collecting paramiko>=2.4.3
Using cached paramiko-2.7.1-py2.py3-none-any.whl (206 kB)
Requirement already satisfied: setuptools>=38.4.0 in c:\program files (x86)\python38-32\lib\site-packages (from netmiko) (41.2.0)
Collecting textfsm
Using cached textfsm-1.1.0-py2.py3-none-any.whl (37 kB)
Collecting bcrypt>=3.1.3
Using cached bcrypt-3.1.7-cp38-cp38-win32.whl (26 kB)
Collecting cryptography>=2.5
Using cached cryptography-2.9.2-cp38-cp38-win32.whl (1.3 MB)
Collecting pynacl>=1.0.1
Using cached PyNaCl-1.4.0-cp38-cp38-win32.whl (193 kB)
Collecting six
Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
Processing c:\users\admin\appdata\local\pip\cache\wheels\8e\70\28\3d6ccd6e315f65f245da085482a2e1c7d14b90b30f239e2cf4\future-0.18.2-py3-none-any.whl
Collecting cffi>=1.1
Using cached cffi-1.14.0-cp38-cp38-win32.whl (165 kB)
Collecting pycparser
Using cached pycparser-2.20-py2.py3-none-any.whl (112 kB)
Installing collected packages: pyserial, pycparser, cffi, six, bcrypt, cryptography, pynacl, paramiko, scp, future, textfsm, netmiko
Successfully installed bcrypt-3.1.7 cffi-1.14.0 cryptography-2.9.2 future-0.18.2 netmiko-3.1.1 paramiko-2.7.1 pycparser-2.20 pynacl-1.4.0 pyserial-3.4 scp-0.13.2 six-1.15.0 textfsm-1.1.0
C:\Users\Admin\Downloads>
2. Cài đặt ntc-templates
C:\python>git clone https://github.com/networktocode/ntc-templates
Cloning into 'ntc-templates'...
remote: Enumerating objects: 8346, done.
remote: Total 8346 (delta 0), reused 0 (delta 0), pack-reused 8346
Receiving objects: 100% (8346/8346), 2.14 MiB | 880.00 KiB/s, done.
Resolving deltas: 100% (4671/4671), done.
C:\python>
C:\>pip install jinja2Defaulting to user installation because normal site-packages is not writeableCollecting jinja2Downloading Jinja2-2.11.2-py2.py3-none-any.whl (125 kB)|████████████████████████████████| 125 kB 939 kB/sCollecting MarkupSafe>=0.23Downloading MarkupSafe-1.1.1-cp38-cp38-win32.whl (16 kB)Installing collected packages: MarkupSafe, jinja2Successfully installed MarkupSafe-1.1.1 jinja2-2.11.2WARNING: You are using pip version 20.2; however, version 20.2.2 is available.You should consider upgrading via the 'c:\program files (x86)\python38-32\python.exe -m pip install --upgrade pip' command.C:\>
- pip install netmiko
- pip install textfsm
- pip install pandas- pip install jinja2- pip install xlwings- pip install pyinstaller- pip install tabula-py
No comments:
Post a Comment