Install python on windows for lab automation (replacing ubuntu)

Install python on Windows PC

When the computer is weak and we cannot install Ubuntu virtual machine (there is python3 available), we can install python3 on Windows and use network automation normally (except for a few functions that cannot run on Windows).

>> Download the Windows version of python3 here

>> Click Next to install.Remember to check Add path environment

>> After the installation is complete; open cmd and enter “python”.It would be ok if it looks like the following

>> If an error is reported, we need to add an environment variable, as follows:

– Enter search “environment”:

and select:

– Then paste the path into the python folder

– Example path on my computer:

C:\Users\(your name)\ApplicationData\Roaming\Python\Python311\Scripts

C:\Program Files\Python311\

C:\Program Files\Python311\Scripts

Then click OK to save and restart the computer

Then try entering “python” in cmd to see if it works?

– To install netmiko we type pip install netmiko

– Then we also tried to build a pre-lab model like this article and test the automation scripts.

– Example creation test script test-py-win.py

Print(“Test python window”)

– If we save the script in drive D:\lab-python Then we enter cmd like this

complete