Bug 239681 - net/py-pcap: Cannot import module with python 3
Summary: net/py-pcap: Cannot import module with python 3
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Muhammad Moinur Rahman
Depends on:
Reported: 2019-08-06 20:14 UTC by Craig Leres
Modified: 2019-08-09 07:27 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (bofh)

poudriere jail build/install capture (7.85 KB, text/plain)
2019-08-06 20:14 UTC, Craig Leres
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Craig Leres freebsd_committer 2019-08-06 20:14:04 UTC
Created attachment 206313 [details]
poudriere jail build/install capture

I was surprised to find that py-pcap does not work with python 3. For example in a poudriere jail running 11.2-RELEASE-p10 if I build and install py36-pcap, attempting to import it results in a stack trace ending with:

    ModuleNotFoundError: No module named '_pcap'

This seems to be related to swig and might well be an upstream problem.

I'll attach a log that shows my test.
Comment 1 Muhammad Moinur Rahman freebsd_committer 2019-08-06 21:34:24 UTC
Hi Leeres,
Yes I saw it too the other day. Maybe we should move forward to net/py-pycap. Scapy works with it. Actually supports py-pcapy too. I am just trying to find which one works better. Seems like py-pycap is well maintained. Any advices?