cancel
Showing results for 
Search instead for 
Did you mean: 

How to import netmiko, paramiko packages on python to write ICX automation scripts

va10461
RUCKUS Team Member

Below is the step-by-step procedure to install python in windows machine and to import paramiko, netmiko packages to python.

Step 1:

Install python on your PC. You can download the latest python software from the below link

https://www.python.org/downloads/windows/

Step 2:

  • Go to search bar in windows and type environment variables. You can see ‘Edit the system environment variables’ option. Click on it.
  • Add these paths to environment variables in windows
  • You need admin rights for the same

 

va10461_0-1695350314641.png

Step 3:

Open new windows command prompt

python -m pip install [packagename]

 

In some windows versions the below commands work

Pip install paramiko

va10461_1-1695350314647.png

Step 4:

Go to Python 3.10, Import paramiko, netmiko modules

 

va10461_2-1695350314647.png

Step 5:

Check in scripts if you have netmiko module installed

C:\Users\va1046\Documents\Python\software\Python-3.10.10\Scripts

 

va10461_3-1695350314649.png

Step 6:

The system is ready to use netmiko packages on python. You can import connecthandler from netmiko in python code to ssh into devices.

from netmiko import ConnectHandler

                   # create a dictionary with the connection details

     devices = {

    "device_type": "ruckus_fastiron",

    "ip": "10.177.95.107",

    "username": "super",

    "password": "pass",

}


Vivek Alaparthi
Staff TSE | CCNA | CCNP | RCNI

RUCKUS Networks, CommScope!

Follow me on LinkedIn

0 REPLIES 0