NetfilterQueue Import Error

Hi guys,

I am working through Zaid’s course (Learn Python & Ethical Hacking From Scratch) and am having some issues importing NetfilterQueue using PyCharm. I have installed the package using pip however when installing the package in PyCharm I keep getting an install error. Currently using pip version 19.3.1 and Python version 3.7.5.

Any help would be greatly appreciated!

Thanks :slight_smile:

What is the error?

I have kinda the same problem


The code look like this

Hope i can get some help with this :slight_smile:

I was able to duplicate the error. I did some research; seems to be a lot of trouble getting it to work with python3. I had problems with scapy with python3 also.

I can get it to work in python2. If you are okay with using python2, you might try what I did, switching to a python2 compiler. Steps I used:
Go to File menu -> Settings… -> select Project Interpreter under Project:[name of your project] -> you will see an icon to the right of the project interpreter drop-down box, it looks like a gear, select the icon -> select Add… -> select Existing Environment then [. . .] box to the far right of Interpreter: -> select usr then bin then python2.7 then OK.
After Python2.7 is showing as the project interpreter, choose the + icon next to the packages table to add a package -> type in NetfilterQueue and then select it, then select Install Package. Pycharm may do some processing for a few minutes.

I’m only a student, so I don’t know if I can help further. I’m still looking into how to get it working with python3. Hope this helps.

gdub - you are awsome :slight_smile:

1 Like