0
/Desktop/mininet/examples$ sudo python tree1024.py

Error:

Traceback (most recent call last):
  File "tree1024.py", line 10, in <module>
    from mininet.cli import CLI
ModuleNotFoundError: No module named 'mininet'

Whenever I am trying to run python file it is throwing this error. can please some guide how to resolve this.

Zoro
  • 420
  • 5
  • 16

2 Answers2

0

Try to clone Mininet and export the path

cd ~
git clone https://github.com/mininet/mininet.git
cd mininet
export PYTHONPATH=$PYTHONPATH:$HOME/mininet/mininet:

Then run the script with python3

sudo python3 tree1024.py
Giuseppe
  • 658
  • 1
  • 6
  • 14
0

Because the mininet is not fully installed, Try to install it through the clone.

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Apr 18 '23 at 22:11