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

How to fix 'ImportError: No module named pox.core' in pox controller 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

我有一个错误:

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

是否有任何解决方案可以解决

你好像没有安装pox
现在 PyPy Python 运行时可以使用 POX。

使用此命令安装 pox:

pip install pox

您也可以从源代码安装它,了解更多信息:https://pypi.org/project/pox/