Search code examples
pythonpox

How to fix 'ImportError: No module named pox.core' in pox controller code


this is my code :

from pox.core import core
import pox.openflow.libopenflow_01 as of
from pox.lib.util import dpid_to_str
from pox.lib.util import str_to_bool

from pox.lib.addresses import EthAddr
from pox.lib.packet.ethernet import ethernet
import pox.lib.packet as pkt

and i have an error with:

File "d:/SDN/pox-master/pox/sw1.py", line 7, in <module>
from pox.core import core
ImportError: No module named pox.core

is there any solutions to fix


Solution

  • It seems you don't have pox installed.
    Now POX is available on the PyPy Python runtime.

    Install pox with this command :

    pip install pox
    

    You can install it from source as well, for more information : https://pypi.org/project/pox/