1

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 Answers2

4

Try :

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

Nagmat
  • 373
  • 4
  • 14
  • what does -fnv denote? – MikiBelavista Apr 29 '23 at 09:55
  • -f: install Open(F)low. -n: install Mini(N)et dependencies + core files. -V : install a particular version of Open (V)switch on Ubuntu. Source : https://github.com/mininet/mininet/blob/master/util/install.sh line 870. – Nagmat May 02 '23 at 19:22
3

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

Kal-1
  • 177
  • 1
  • 9