Error when instslling netfilterqueue

when working through ‘learn python & ethical hacking’ with zaid
im working on section 8 where i need to use ‘netfilterqueue’ in the course it says to use ‘pip install netfilerqueue’ to install it, however i get som huge error come up when i tried this so i did so poking around on google and found a link to a git repository to install it i have done this but when i try to run my script ‘’ i get an error

'Traceback *most recent call last:
File “”, line 2, in
import netfilterqueue
ImportError: no module named netfilterqueue

does anyone know any way i can deal with this

The netfilterqueue doesn’t work with the latest version of python. I think it works for all versions below python 3.6. I tried installing it and it worked on both python 2.7 and python 3.6.
The commands I used were:
sudo apt install build-essential python-dev libnetfilter-queue-dev
pip install NetfilterQueue

yes i found the other post about this and have followed lots of instructions on the fix,
thank you for responding @Apurv-StationX
I am now some lectures ahead of this error i was about to admit that in my post when you replied
i am now working on the lecture “Intercepting HTTP Requests” and as i have run my script its thrown a series of errors as expected giving the python2 to python3 conversions

Hi Apurv, how are you. Need your help… I 've encountered the same problem but two years later :laughing: tried your way but got this:
sudo apt install build-essential python-dev libnetfilter-queue-dev
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
Package python-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
python2-dev:i386 python2:i386 python2-dev python2 python-dev-is-python3

Is there any other solution?

Thanks much

P.S. I also tried to install it from the source/GitHub but GitHub since Aug 21 does not support remote authentication ((

Did you try for both python 2.7 and python 3.6?