我目前正在研究GNS3中的网络自动化容器。当我试图使用凝固汽油弹库时,我得到了以下两个错误:
我在这台机器上检查了Python版本,它是3.8.3,因此这里支持凝固汽油弹。有人知道是什么导致了这个错误吗?
发布于 2022-03-20 11:14:07
There are 2 probable issues:
1. The nano files you created and saved in the appliance
2. Python - Netmiko - Napalm versions compatibility
Network Automation Appliance (NAA) comes preinstalled with Python 2.7 & 3.8 +
Netmiko 3.0 + Napalm 2.5.0.
You can see this with >>> pip freeze
Solution:
Use a fresh Network Automation Appliance (NAA) in your GNS3 topology.
Re-install Napalm in NAA with >>> pip install napalm
(This will auto-install Napalm's compatible version of Netmiko)
Check the version of Napalm and Netmiko installed with >>> pip freeze
napalm==2.5.0
netmiko==2.4.2
paramiko==2.7.1发布于 2022-10-05 23:07:10
Tl;dr:不要将文件命名为napalm.py
您的文件名为napalm.py,库也称为凝固汽油。当您执行from napalm import get_network_driver时,Python会在您的文件napalm.py中查找get_network_driver。所以最好的办法是重命名你的文件。
https://stackoverflow.com/questions/64357082
复制相似问题