Hi,
Using a virtualenv, I am unable to run the following:
import argparse
import logging
import sys
import os
from netmiko import ConnectHandler
It works fine in the console with the python 3.6.2 interpreter (same as my virtual environment).
I see that is says py3.5 is what's supported, but I have the same issue with 2.7.
I get this:
` Traceback (most recent call last):
File "/Users/punkrokk/repos/netmiko/netmiko.py", line 8, in
from netmiko import ConnectHandler
File "/Users/punkrokk/repos/netmiko/netmiko.py", line 8, in
from netmiko import ConnectHandler
ImportError: cannot import name 'ConnectHandler'
Process finished with exit code 1 `
Any thoughts on troubleshooting?
@punkrokk It looks like you have created a file name netmiko.py and it is trying to import from that and not from the netmiko library:
/Users/punkrokk/repos/irflow-integrations/integrations/netmiko/netmiko.py
You need to rename this file and remove any .pyc files that were created.
that was it! thanks @ktbyers
Most helpful comment
@punkrokk It looks like you have created a file name
netmiko.pyand it is trying to import from that and not from the netmiko library:You need to rename this file and remove any .pyc files that were created.