Need help understanding what I did wrong for NAPALM

73 views
Skip to first unread message

Casey Davis

unread,
Aug 1, 2021, 5:31:36 PM8/1/21
to NetBox
I have installed Netbox on a clean install of Ubuntu 20 LTS. I followed the install guide on the netbox wiki. I have set the NAPALM creds in the configurations.py. When I click on the tab for LLDP I get "NAPALM is not installed error". I have verified NAPALM is installed in the venv for netbox. also on the base system. It is not listed in the dir below and not sure why

labroot@lab-netbox-1:/opt/netbox/venv/lib/python3.8/site-packages$ ll | grep nap
labroot@lab-netbox-1:/opt/netbox/venv/lib/python3.8/site-packages$ 

I know its probably something simple I do not understand about the python virtual environment.

When I run pyhton3 shell in the venv I am not able to import napalm.  

 

Brian Candler

unread,
Aug 2, 2021, 6:14:01 AM8/2/21
to NetBox
It sounds like you didn't install napalm into the venv.  You'd have to activate it first.  And you *must not* do "sudo pip install" as that will forget about the venv ("sudo -E pip install..." might work).

You can do "sudo -s" to get a root shell, *then* activate the virtualenv, *then* do "pip install ..."

The simplest way though, is simply to create /opt/netbox/local_requirements.txt containing just "napalm" (without the quotes).  Then run "./upgrade.sh" as you would when upgrading Netbox.  This will recreate the virtualenv from scratch, but with your new package(s) in it.

Reply all
Reply to author
Forward
0 new messages