/*auto readmore*/ /*auto readmore*/ /* an hien script*/ // an hien password /*an hien ma chuong trinh cong tru */ /*Scrollbox thanh cuon*/ /***Nhung CODE***/ /* dòng xanh dòng trắng */ /* https://cdnjs.com/libraries/prism lay thu vien, can vao ten file ma goi 1. copy link vao vi du:prism-python.min.js 2. ten ngon nua la python */ /*=== New posts ===*/ /*header slider*/ /*=== bai viet lien quan===*/ /*===tabcode===*/
Showing posts with label LIB. Show all posts
Showing posts with label LIB. Show all posts

Library, Share Tài Liệu Cisco


  1. CCNA TTG Training Center - Download
  2. CCNA networklession - Download
  3. CCNP Switch networklession - Download
  4. CCNP Route networklession - Download
  5. CCNP Tshoot networklession - Download
  6. 101 Lab CCNA - Download


Cài Đặt Thư Viện Cho Python / Installing Python Modules / Installing Python Packages

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>



3. Jinja2 template: Dùng import dữ liệu từ danh sách vào template với những trị trí đã được định sẵn (tương tự như mail merger trong word).
C:\>pip install jinja2
Defaulting to user installation because normal site-packages is not writeable
Collecting jinja2
  Downloading Jinja2-2.11.2-py2.py3-none-any.whl (125 kB)
     |████████████████████████████████| 125 kB 939 kB/s
Collecting MarkupSafe>=0.23
  Downloading MarkupSafe-1.1.1-cp38-cp38-win32.whl (16 kB)
Installing collected packages: MarkupSafe, jinja2
Successfully installed MarkupSafe-1.1.1 jinja2-2.11.2
WARNING: 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:\>

4. Một số thư viện hay dùng

- pip install netmiko
- pip install textfsm
- pip install pandas
- pip install jinja2
- pip install xlwings
- pip install pyinstaller
- pip install tabula-py

5. Kiểm tra các thư viện đã cài đặt trên python

pip freeze
Khi gõ lệnh này thì các thư viện đã cài sẽ được list ra


Xong!
/*header slide*/