napalm-automation / napalm

Network Automation and Programmability Abstraction Layer with Multivendor support
Apache License 2.0
2.26k stars 554 forks source link

MacOS Python install issue #1816

Closed BENBUNOR closed 1 year ago

BENBUNOR commented 1 year ago

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)

BENBUNOR commented 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()

ktbyers commented 1 year ago

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.

Ebenezer91 commented 1 year ago

Yes I have created a vent. However I get this scpexception: privilege denied error all the time.

Ebenezer91 commented 1 year ago

@ktbyers Yes I have created a vent. However I get this scpexception: privilege denied error all the time.

ktbyers commented 1 year ago

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)

Ebenezer91 commented 1 year ago

I do have privilege level 15 access @ktbyers