10000
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ImportError: No module named mininext.topo for " from mininext.topo import Topo" #13
In my code similar to mininet I have written the import as "from mininext.topo import Topo" and I get the following error
Traceback(most recent call last)
File "example/16router/start.py" ,line 10 ,in
from mininext.topo import Topo
ImportError: No module named mininext.topo
The similar fashion continues for "from mininext.net import MiniNExT" and "from mininet.net import Mininet"
Please if anyone knows the solution for the above error, kindly post it here.
Same problem here .... how and where to include mininet.topo package to python? The below code could not find mininet.topo package.
from mininet.topo import Topo
The mininet installer from the repo installs to /usr/local/lib which is not in PYTHONPATH, found it with find /usr/local -name "*mininet*". So, I started Python with
student@student-VirtualBox:~/Devel$ sudo PYTHONPATH=/usr/local/lib/python2.7/dist-packages python
Python 2.7.15+ (default, Oct 7 2019, 17:39:04)
[GCC 7.4.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mininet
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "mininet.py", line 4, in <module>
from mininet.topo import Topo
ImportError: No module named topo
Even more:
student@student-VirtualBox:~/Devel$ python
Python 2.7.15+ (default, Oct 7 2019, 17:39:04)
[GCC 7.4.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> print environ['PYTHONPATH']
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'environ' is not defined
>>> print os.environ['PYTHONPATH']
/usr/local/lib/python2.7/dist-packages
Activity
tambel2020 commentedon Sep 25, 2017
Same problem here .... how and where to include mininet.topo package to python? The below code could not find mininet.topo package.
from mininet.topo import Topo
TahaKhan1 commentedon Oct 24, 2017
Make sure you are running mininet as root.
smlng commentedon Aug 13, 2018
The mininet installer from the repo installs to
/usr/local/libwhich is not in PYTHONPATH, found it withfind /usr/local -name "*mininet*". So, I started Python withand then
import mininetworks.paaguti commentedon Apr 2, 2020
No more!
in 2.3.0d6
Even more:
So, setting PYTHONPATH in sudo makes little sense
codergezx commentedon Aug 31, 2021
pip install mininet