简体   繁体   中英

Why can't I install the module 'pyof' in PyCharm?

I get the following error due to the 'pyof' module which seems to be missing:

/Users/daniela/PycharmProjects/ofp_sniffer/end_to_end/bin/python /Users/daniela/PycharmProjects/ofp_sniffer/ofp_sniffer.py
Traceback (most recent call last):
  File "/Users/daniela/PycharmProjects/ofp_sniffer/ofp_sniffer.py", line 19, in <module>
    from libs.gen.packet import Packet
  File "/Users/daniela/PycharmProjects/ofp_sniffer/libs/gen/packet.py", line 6, in <module>
    import libs.tcpiplib.prints
  File "/Users/daniela/PycharmProjects/ofp_sniffer/libs/tcpiplib/prints.py", line 12, in <module>
    from apps.ofp_proxies import OFProxy
  File "/Users/daniela/PycharmProjects/ofp_sniffer/apps/ofp_proxies.py", line 13, in <module>
    from libs.tcpiplib.process_data import get_protocol
  File "/Users/daniela/PycharmProjects/ofp_sniffer/libs/tcpiplib/process_data.py", line 7, in <module>
    from pyof.foundation.basic_types import BinaryData
ModuleNotFoundError: No module named 'pyof'

However, I tried to install the packet via the project interpreter, there is no packet by that name. I have also tried pip install pyof or pip3 install pyof and this is the result:

Collecting pyof
Could not find a version that satisfies the requirement pyof (from versions: )
No matching distribution found for pyof

Thanks everyone but it looks like I just had to manually install python-openflow via pip install python-openflow.

if you try to use this package https://github.com/JuanFMontesinos/PyOF then try pip3 install pynpflow

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM