python module for libnet in Opensuse

454 Views Asked by At

I have tried to run an Python program in my Opensuse OS this Program used libnet and pcap.

import queue
import sys
import socket
import libnet
from libnet.constants import *
import pcap

I have installed libnet-devel but when i run the program i recieve the folowing message.

Traceback (most recent call last):
  File "example.py", line 9, in <module>
    import libnet
ImportError: No module named libnet

I have tried with different Python version, How can i solve this Problem?

1

There are 1 best solutions below

2
On

using the system python (the one in /usr/bin/python):

there does not seem to be a version of pylibnet packaged and available through yast, which is why you need to install one using pip (which is a program for installing python packages).

libnet-devel only installs the c library - the above installs the python library.

[edit: forgot the "install" in the pip command; added download instructions]