By Fathalla Ramadan
February 2026 | Alexandria, Egypt
If you’re a network engineer or student trying to automate Cisco, Juniper, or Arista devices—but keep getting stuck at “ModuleNotFoundError: No module named ‘netmiko’”—you’re not alone.
I’ve trained engineers across Egypt, Saudi Arabia, Europe, and Asia, and one of the most common roadblocks is simply installing Netmiko correctly on Windows.
The good news? It’s free, legal, and takes less than 10 minutes—once you know the right steps.
In this guide, I’ll walk you through a clean, reliable installation that works—even if you’ve never used Python before.
✅ What You’ll Achieve
- Install Python 3 correctly on Windows
- Set up
pip(Python’s package installer) - Install Netmiko without errors
- Run your first script to back up a router config
💡 Note: This guide uses English software interfaces—just like real network automation tools. But I’ll explain every step clearly, regardless of your coding background.
🛠️ What You’ll Need
- A Windows 10/11 PC (any language)
- Internet access
- Administrator rights (to install software)
- 10 minutes of your time
🔧 Step 1: Install Python 3 (Correctly!)
- Go to python.org/downloads
- Download Python 3.11 or 3.12 (latest stable version)
- Run the installer as Administrator
- ⚠️ CRITICAL: Check “Add Python to PATH” at the bottom
→ This is why 90% of installations fail! - Click “Install Now”
- Wait for completion → Close installer
✅ Verify: Open Command Prompt and type:
python --version
You should see: Python 3.x.x
🔌 Step 2: Upgrade pip (Optional but Recommended)
In Command Prompt, run:
python -m pip install --upgrade pip
This ensures you have the latest package manager.
📦 Step 3: Install Netmiko
In the same Command Prompt window, run:
pip install netmiko
Wait 1–2 minutes. You’ll see:
1 Successfully installed netmiko...
✅ Verify: Run this command:
python -c "import netmiko; print('Netmiko installed successfully!')"
If you see the message—congratulations! Netmiko is ready.
🧪 Step 4: Test with a Simple Script
- Open Notepad
- Paste this code (replace IP, username, password):
from netmiko import ConnectHandler
router = {
‘device_type’: ‘cisco_ios’,
‘host’: ‘192.168.1.1’,
‘username’: ‘admin’,
‘password’: ‘cisco’,
}
net_connect = ConnectHandler(**router)
output = net_connect.send_command(‘show ip interface brief’)
print(output)
net_connect.disconnect()
- Save as
test_netmiko.pyon your Desktop - Open Command Prompt, go to Desktop:
cd Desktop
- Run the script:
python test_netmiko.py
If you see interface output—you’ve just automated a real network device!
🔒 Security Tip: Never hardcode passwords in production. Use environment variables or secure vaults.
💡 Common Fixes (If You Get Errors)
| Error | Solution |
|---|---|
'python' is not recognized | Reinstall Python + check “Add to PATH” |
SSL certificate error | Run: pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org netmiko |
Connection timed out | Ensure your router has SSH enabled and is reachable |
🌍 Why This Matters—For Engineers Everywhere
Automation isn’t just for Silicon Valley.
Whether you’re in Cairo, Riyadh, Berlin, or Manila, learning Netmiko lets you:
- Back up 100 routers in 2 minutes
- Push configs during maintenance windows
- Reduce human error in repetitive tasks
And it all starts with a clean install.
📚 Next Step: Automate Real Tasks
Try Lab 26.1: Automating Router Backups from my IP Routing and Switching Lab Handout Book—used by learners in 30+ countries.
Or explore free resources on Cisco DevNet and GitHub.
💬 Final Thought
You don’t need to be a programmer to use Python.
You just need to be a problem-solver.
And if you’ve managed networks for years—you already are.
—
Fathalla Ramadan
Network Architect & Educator
Alexandria, Egypt
35+ years in IT, networking, and technology education across the Middle East and beyond
