-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ModuleNotFoundError: No module named 'netmiko' #3485
Comments
You need to post your full Python exception stack trace. This type of issue is typically caused by using a different Python (i.e. the Python that you are executing is not the Python that Netmiko is installed in). |
Hello, Thank you for your response. This is what I get when I use pdb: (base) dharris@netbox:~$ python3 DAL1-FW1-Primary.py
|
What does the following command show?
|
I get this! |
Okay...so whatever For the Python that you are executing, you have not installed Netmiko. |
I appreciate the help! I think you are correct. It appears that Netmiko is installed for version 3.11. Is there a way to install python for a specific version. Like if I want to use python3.8 how can I install netmiko specifically for python3.8? |
Fix your |
Awesome! Using the Python virtual environment resolved my issue.
Thank you for the assistance!
[signature_1084828966]<http://www.247networks.com/>
Demetrius Harris / Consulting Engineer 24/7 Networks, Inc
116 Inverness Dr. E, #200, Englewood, CO 80112
720.881.3217 | ***@***.******@***.***>
Confidentiality Note: This email may contain confidential and/or private information. If you received this email in error please delete and notify sender
***@***.***?anonymous&ep=signature> Book time to meet with ***@***.***?anonymous&ep=signature>
…________________________________
From: Kirk Byers ***@***.***>
Sent: Friday, August 23, 2024 11:49 AM
To: ktbyers/netmiko ***@***.***>
Cc: Demetrius Harris ***@***.***>; Author ***@***.***>
Subject: Re: [ktbyers/netmiko] ModuleNotFoundError: No module named 'netmiko' (Issue #3485)
EXTERNAL: This email originated from outside the organization. Use your best judgement, and if unsure, ask!
Fix your no pip issue and then just python3.8 -m pip install netmiko (though you really should create a Python virtual environment and use that Python instead).
—
Reply to this email directly, view it on GitHub<#3485 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BILW5XO2VYTAIJOU5QHM673ZS5YZ5AVCNFSM6AAAAABM63LSQWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBXGU2DGNBVGM>.
You are receiving this because you authored the thread.
|
I am attempting to run a python script within Ubuntu 22.0.4. I have run the same script successfully from my windows machine but when I run from Ubuntu I get the following error: ModuleNotFoundError: No module named 'netmiko'. I have confirmed that the module is installed via the following:
(base) dharris@netbox:~$ pip list
Package Version
archspec 0.2.1
bcrypt 4.2.0
boltons 23.0.0
Brotli 1.0.9
certifi 2023.11.17
cffi 1.17.0
charset-normalizer 2.0.4
conda 23.11.0
conda-content-trust 0.2.0
conda-libmamba-solver 23.12.0
conda-package-handling 2.2.0
conda_package_streaming 0.9.0
cryptography 41.0.7
distro 1.8.0
future 1.0.0
idna 3.4
jsonpatch 1.32
jsonpointer 2.1
libmambapy 1.5.3
menuinst 2.0.1
netbox-bgp 0.12.1
netbox-topology-views 3.9.1
netmiko 4.4.0
(base) dharris@netbox:~$ pipdeptree
Warning!!! Cyclic dependencies found:
Brotli==1.0.9
conda-content-trust==0.2.0
└── cryptography [required: >=41, installed: 41.0.7]
└── cffi [required: >=1.12, installed: 1.17.0]
└── pycparser [required: Any, installed: 2.21]
netbox-bgp==0.12.1
netbox-topology-views==3.9.1
netmiko==4.4.0
├── cffi [required: >=1.17.0rc1, installed: 1.17.0]
│ └── pycparser [required: Any, installed: 2.21]
├── ntc_templates [required: >=3.1.0, installed: 6.0.0]
│ └── textfsm [required: >=1.1.0,<2.0.0, installed: 1.1.3]
│ ├── future [required: Any, installed: 1.0.0]
│ └── six [required: Any, installed: 1.16.0]
├── paramiko [required: >=2.9.5, installed: 3.4.1]
│ ├── bcrypt [required: >=3.2, installed: 4.2.0]
│ ├── cryptography [required: >=3.3, installed: 41.0.7]
│ │ └── cffi [required: >=1.12, installed: 1.17.0]
│ │ └── pycparser [required: Any, installed: 2.21]
│ └── PyNaCl [required: >=1.5, installed: 1.5.0]
│ └── cffi [required: >=1.4.1, installed: 1.17.0]
│ └── pycparser [required: Any, installed: 2.21]
├── pyserial [required: >=3.3, installed: 3.5]
├── PyYAML [required: >=5.3, installed: 6.0.2]
├── scp [required: >=0.13.6, installed: 0.15.0]
│ └── paramiko [required: Any, installed: 3.4.1]
│ ├── bcrypt [required: >=3.2, installed: 4.2.0]
│ ├── cryptography [required: >=3.3, installed: 41.0.7]
│ │ └── cffi [required: >=1.12, installed: 1.17.0]
│ │ └── pycparser [required: Any, installed: 2.21]
│ └── PyNaCl [required: >=1.5, installed: 1.5.0]
│ └── cffi [required: >=1.4.1, installed: 1.17.0]
│ └── pycparser [required: Any, installed: 2.21]
├── setuptools [required: >=65.0.0, installed: 68.2.2]
└── textfsm [required: >=1.1.3, installed: 1.1.3]
├── future [required: Any, installed: 1.0.0]
└── six [required: Any, installed: 1.16.0]
pipdeptree==2.23.1
├── packaging [required: >=23.1, installed: 23.1]
└── pip [required: >=23.1.2, installed: 23.3.1]
pynetbox==7.3.3
├── packaging [required: <24.0, installed: 23.1]
└── requests [required: >=2.20.0,<3.0, installed: 2.31.0]
├── certifi [required: >=2017.4.17, installed: 2023.11.17]
├── charset-normalizer [required: >=2,<4, installed: 2.0.4]
├── idna [required: >=2.5,<4, installed: 3.4]
└── urllib3 [required: >=1.21.1,<3, installed: 1.26.18]
pyOpenSSL==23.2.0
└── cryptography [required: >=38.0.0,<42,!=40.0.1,!=40.0.0, installed: 41.0.7]
└── cffi [required: >=1.12, installed: 1.17.0]
└── pycparser [required: Any, installed: 2.21]
PySocks==1.7.1
wheel==0.41.2
I am looking for any assistance you might be able to give!
Relevant Python code
from netmiko import ConnectHandler
from getpass import getpass
import time, sys, getpass, paramiko
The text was updated successfully, but these errors were encountered: