nornir-automation / nornir

Pluggable multi-threaded framework with inventory management to help operate collections of devices
https://nornir.readthedocs.io/
Apache License 2.0
1.4k stars 237 forks source link

Unable to start nornir in MAC #687

Closed rg0809 closed 3 years ago

rg0809 commented 3 years ago

While starting nornir getting below error

>>> from nornir import InitNornir
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'InitNornir' from 'nornir' (/Users/r/PycharmProjects/NWScripting/venv/lib/python3.9/site-packages/nornir/__init__.py)

nornir version 3.1.1

ktbyers commented 3 years ago

Probably try using PIP to uninstall and re-install nornir in your given virtual environment.

pip uninstall nornir
pip install nornir

If you get the same error, then you need to show the contents of this file:

/Users/r/PycharmProjects/NWScripting/venv/lib/python3.9/site-packages/nornir/__init__.py

It is very, very likely an environment issue on your side.

rg0809 commented 3 years ago

Thanks kybyers, indeed it was a environment issue. I had another package installed which was conflicting; uninstalled the package and it's now working for me.