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

set the PYTHONPATH variable to include the path to the ACI toolkit

Ok, so I had this defined before, and I got a new Mac, and now I cant remember how exactly I did it... basically what happens now when I enter the SAMPLES and try to run any of the .py, I get:

MatBook-Pro:samples mjovanovic$ python tutorial.py

Traceback (most recent call last):

  File "tutorial.py", line 30, in <module>

    from acitoolkit.acitoolkit import *

  File "/Users/mjovanovic/acitoolkit/acitoolkit/__init__.py", line 31, in <module>

    from .acisession import EventHandler, Login, Session, Subscriber  # noqa

  File "/Users/mjovanovic/acitoolkit/acitoolkit/acisession.py", line 46, in <module>

    from six.moves.queue import Queue

ImportError: No module named queue

MatBook-Pro:samples mjovanovic$

PS. I have credentials.py in all the required folders.

1 Reply 1

Alex Stevenson
Cisco Employee
Cisco Employee

Hi, it seems you are referencing this repo:

https://github.com/datacenter/acitoolkit/blob/master/samples/README.md

You may want to try uninstalling and then re-install using the setup.py

 

You can find the location of acitoolkit module by print(help(acitoolkit))

It's at the very end.

 

To set the PYTHONPATH variable, try these

(Mac) https://www.tutorialspoint.com/How-to-set-python-environment-variable-PYTHONPATH-on-Mac

(Windows) https://www.geeksforgeeks.org/pythonpath-environment-variable-in-python/

(Linux) https://www.tutorialspoint.com/How-to-set-python-environment-variable-PYTHONPATH-on-Linux