Closed BENBUNOR closed 1 year ago
import napalm import json from getpass import getpass
driver = napalm.get_network_driver('ios')
device = driver( hostname='10.0.0.0', username='adm', password=getpass(), ) device.open() device.load_merge_candidate(filename='config.txt') device.commit_config()
No idea. I would probably create a new virtual environment and reinstall the dependencies.
If that didn't work, I would probably install Python 3.10 for MacOS and create a virtual environment using that...and then try that.
Yes I have created a vent. However I get this scpexception: privilege denied error all the time.
@ktbyers Yes I have created a vent. However I get this scpexception: privilege denied error all the time.
Okay, you need a privilege level 15 account to be able to transfer the files. No enable() call just a straight privilege 15 account. Alternatively, you can do an inline transfer (assuming Cisco IOS/IOS-XE)
I do have privilege level 15 access @ktbyers
Traceback (most recent call last): File "/Users/Desktop/pyproject/nap.py", line 3, in
from napalm.base import get_network_driver
File "/Users/Desktop/pyproject/work/lib/python3.11/site-packages/napalm/init.py", line 5, in
from napalm.base import get_network_driver
File "/Users/Desktop/pyproject/work/lib/python3.11/site-packages/napalm/base/init.py", line 24, in
from napalm.base.base import NetworkDriver
File "/Users/Desktop/pyproject/work/lib/python3.11/site-packages/napalm/base/base.py", line 25, in
import napalm.base.helpers
File "/Users/Desktop/pyproject/work/lib/python3.11/site-packages/napalm/base/helpers.py", line 15, in
from lxml import etree
ImportError: dlopen(/Users/Desktop/pyproject/work/lib/python3.11/site-packages/lxml/etree.cpython-311-darwin.so, 0x0002): symbol not found in flat namespace (_xmlFree)