cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1173
Views
0
Helpful
1
Replies

ModuleNotFoundError when I try to follow the CL-DEVWKS-2808

Jacky Liu
Cisco Employee
Cisco Employee

Hello everyone,

 

I am using Mac to try to learn python, pyats and genie for automation and seeing the following problem when I reach to the step that load the testbed into Python.

 

from genie.testbed import load

# load the testbed file
testbed = load('files/simple-testbed.yaml')

# let's see our testbed devices
testbed.devices
# TopologyDict({'csr1000v-1': <Device csr1000v-1 at 0x10cd0a3c8>})

# get the device we are interested in
csr = testbed.devices['csr1000v-1']

# connect and run commands
csr.connect()
csr.execute('show interfaces')

 

In Mac, when I tried to execute it, it prompted ModuleNotFoundError: No module named 'pyats'. I have been following the preparation procedure to setup the Virtual environment accordingly and install pyats with [full] option.

I did tried it again in Linux (Ubuntu), same error happened again but it prompted for 'genie' this time.

 

I have been googling it but seem no luck so far.

 

Thanks alot for any help!

 

Cheers~

1 Reply 1

Alex Stevenson
Cisco Employee
Cisco Employee

 

This may have something to do with the virtual environment, or rather, lack thereof. Please see this related discussion:

 

Trouble installing PyATS + Genie on Ubuntuhttps://community.cisco.com/t5/automation-and-analytics/trouble-installing-pyats-genie-on-ubuntu/m-p/3875821