Search code examples
pythonpython-3.xpython-2.7mininet

ImportError: No module named mininet.log


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


Solution

  • 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