8000 ImportError: No module named mininext.topo for " from mininext.topo import Topo" · Issue #13 · USC-NSL/miniNExT · GitHub
[go: up one dir, main page]

Skip to content

ImportError: No module named mininext.topo for " from mininext.topo import Topo" #13

Open

Description

@deegopi

Hi All,

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.

Thanks for your help!!!

Activity

  1. tambel2020 commented on Sep 25, 2017

    @tambel2020

    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

  2. TahaKhan1 commented on Oct 24, 2017

    @TahaKhan1

    Make sure you are running mininet as root.

  3. smlng commented on Aug 13, 2018

    @smlng

    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

    sudo PYTONPATH=/usr/local/lib/python2.7/dist-packages:$PYTHONPATH python
    

    and then import mininet works.

  4. paaguti commented on Apr 2, 2020

    @paaguti

    No more!
    in 2.3.0d6

    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
    

    So, setting PYTHONPATH in sudo makes little sense

  5. codergezx commented on Aug 31, 2021

    @codergezx

    pip install mininet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0