1

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?

andrew cooke
  • 45,717
  • 10
  • 93
  • 143
MSK
  • 159
  • 1
  • 2
  • 7

1 Answers1

1

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]

andrew cooke
  • 45,717
  • 10
  • 93
  • 143
  • i have tried to install with pip install pylibnet but `Could not find any downloads that satisfy the requirement pylibnet No distributions at all found for pylibnet` what can i do – MSK Nov 10 '13 at 18:31
  • oh, ok. looks like you need to download it yourself - see update above. – andrew cooke Nov 10 '13 at 18:48