Skip to content

Does not work with python 3.12 (and above) because of module imp got removed #58

@attila123

Description

@attila123

For example:

$ python3.12 
Python 3.12.6 (main, Sep  9 2024, 00:00:00) [GCC 14.2.1 20240801 (Red Hat 14.2.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from pcapfile import savefile
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.12/site-packages/pcapfile/savefile.py", line 13, in <module>
    import pcapfile.linklayer as linklayer
  File "/usr/local/lib/python3.12/site-packages/pcapfile/linklayer.py", line 7, in <module>
    import imp
ModuleNotFoundError: No module named 'imp'
>>> 

Just googled it and read a comment: "It appears that the imp module was removed in python 3.12. It had been deprecated since 3.4 (9 years ago)."
(https://www.reddit.com/r/Fedora/comments/184lph5/modulenotfounderror_no_module_named_imp_when/)

$ pip3.12 freeze | grep pypcapfile
pypcapfile==0.12.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions