ImportError: No module named mininet.log

Viewed 991

I am working on mininet when I run miniedit without sudo it gives me error

*** Mininet must run as root.

But when I run it as root it gives me a new error

Traceback (most recent call last):
  File "./miniedit.py", line 27, in <module>
    from mininet.log import info, debug, warn, setLogLevel
ImportError: No module named mininet.log

Please help me resolve this error

2 Answers

I make a test with pycharm and if you install the library with the command : pip install mininet

your import may not have any error

maybe you installed your library with : sudo pip install mininet and your library is only available for root user

try sudo pip uninstall mininet and pip install mininet

Try :

PYTHON=python3 util/install.sh -fnv from https://github.com/mininet/mininet/blob/master/INSTALL

Related