NetfilterQueue not installing - python

root#kali:/home/kali/Desktop# pip install NetfilterQueue
Collecting NetfilterQueue
Using cached NetfilterQueue-0.8.1.tar.gz (58 kB)
Building wheels for collected packages: NetfilterQueue
Building wheel for NetfilterQueue (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-6ltnc7gf/netfilterqueue/setup.py'"'"'; __file__='"'"'/tmp/pip-install-6ltnc7gf/netfilterqueue/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-v0vd42ah
cwd: /tmp/pip-install-6ltnc7gf/netfilterqueue/
Complete output (13 lines):
running bdist_wheel
running build
running build_ext
skipping 'netfilterqueue.c' Cython extension (up-to-date)
building 'netfilterqueue' extension
creating build
creating build/temp.linux-x86_64-3.8
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.8 -c netfilterqueue.c -o build/temp.linux-x86_64-3.8/netfilterqueue.o
netfilterqueue.c:437:10: fatal error: libnfnetlink/linux_nfnetlink.h: No such file or directory
437 | #include "libnfnetlink/linux_nfnetlink.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for NetfilterQueue
Running setup.py clean for NetfilterQueue
Failed to build NetfilterQueue
DEPRECATION: Could not build wheels for NetfilterQueue which do not use PEP 517. pip will fall back to legacy 'setup.py install' for these. pip 21.0 will remove support for this functionality. A possible replacement is to fix the wheel build issue reported above. You can find discussion regarding this at https://github.com/pypa/pip/issues/8368.
Installing collected packages: NetfilterQueue
Running setup.py install for NetfilterQueue ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-6ltnc7gf/netfilterqueue/setup.py'"'"'; __file__='"'"'/tmp/pip-install-6ltnc7gf/netfilterqueue/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-qodwn5k_/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.8/NetfilterQueue
cwd: /tmp/pip-install-6ltnc7gf/netfilterqueue/
Complete output (13 lines):
running install
running build
running build_ext
skipping 'netfilterqueue.c' Cython extension (up-to-date)
building 'netfilterqueue' extension
creating build
creating build/temp.linux-x86_64-3.8
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.8 -c netfilterqueue.c -o build/temp.linux-x86_64-3.8/netfilterqueue.o
netfilterqueue.c:437:10: fatal error: libnfnetlink/linux_nfnetlink.h: No such file or directory
437 | #include "libnfnetlink/linux_nfnetlink.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-6ltnc7gf/netfilterqueue/setup.py'"'"'; __file__='"'"'/tmp/pip-install-6ltnc7gf/netfilterqueue/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-qodwn5k_/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.8/NetfilterQueue Check the logs for full command output.
I tried apt-get install build-essential python3-dev libnetfilter-queue-dev
but then i get
root#kali:/home/kali/Desktop# apt-get install build-essential python3-dev libnetfilter-queue-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libnetfilter-queue-dev
i'm trying to install netfilterqueue library for python3 but i cant install netfilter queue, any help? ive tried installing livnetfilter queue but it also doesn't work, ive searched online and i couldn't find anything. whats the problem

After researching a lot in this area, I find that scapy does not work well in python-python2 and netfilterqueue does not work well in python3, without downgrading the language I can achieve this, I recommend you to correct any additional error, execute << dpkg - configure -a >> and then << apt-get update >>, because this version is unattended and can generate broken packages in your repository list
apt install python3-pip git libnfnetlink-dev libnetfilter-queue-dev
pip3 install -U git+https://github.com/kti/python-netfilterqueue

hello first install netfilterqueue on your linux machine
sudo apt install libnfnetlink-dev libnetfilter-queue-dev
then you should know netfilterqueue for python3+ is named nfqp3 so install it with
pip3 install nfqp3
it is worth mentioning that when importing it in a python script you should import it as netfilterqueue not nfqp3

To install from source:
$ git clone git#github.com:kti/python-netfilterqueue.git
cd python-netfilterqueue
python setup.py install

pip install https://github.com/johnteslade/python-netfilterqueue/archive/refs/heads/update-cython-code.zip
it will work by this command 100%

Related

is it possible to install glpk for raspberry pi?

I want to install glpk on a raspberry pi 3. I use a virtual environment testEnv created with venv.
python3 -m venv testEnv
I have allready successfully installed pyomo
python3 -m pip install pyomo
But when I try
python3 -m pip install glpk
I get the following Error:
(testEnv) pi#raspberrypi:~/Desktop/MA-AU/Software-Test $ python3 -m pip install glpk
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting glpk
Using cached https://files.pythonhosted.org/packages/ca/26/198ec4b9d1b752404a7ecb104bd1b4bfba711feaadabc0b1407de87adb26/glpk-0.4.6.tar.gz
Installing build dependencies ... done
Building wheels for collected packages: glpk
Running setup.py bdist_wheel for glpk ... error
Complete output from command /home/pi/Desktop/MA-AU/Software-Test/testEnv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-zpb2w0ff/glpk/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-0x260le1 --python-tag cp37:
running bdist_wheel
running build
running build_ext
building 'glpk' extension
creating build
creating build/temp.linux-armv7l-3.7
creating build/temp.linux-armv7l-3.7/src
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DVERSION_NUMBER="0.4.6" -I/home/pi/Desktop/MA-AU/Software-Test/testEnv/include -I/usr/include/python3.7m -c src/glpk.c -o build/temp.linux-armv7l-3.7/src/glpk.o
In file included from src/glpk.c:21:
src/lp.h:24:10: fatal error: glpk.h: Datei oder Verzeichnis nicht gefunden
#include <glpk.h>
^~~~~~~~
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for glpk
Running setup.py clean for glpk
Failed to build glpk
Installing collected packages: glpk
Running setup.py install for glpk ... error
Complete output from command /home/pi/Desktop/MA-AU/Software-Test/testEnv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-zpb2w0ff/glpk/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-5egd9fdm/install-record.txt --single-version-externally-managed --compile --install-headers /home/pi/Desktop/MA-AU/Software-Test/testEnv/include/site/python3.7/glpk:
running install
/tmp/pip-build-env-l3jwi8g7/lib/python3.7/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
setuptools.SetuptoolsDeprecationWarning,
running build
running build_ext
building 'glpk' extension
creating build
creating build/temp.linux-armv7l-3.7
creating build/temp.linux-armv7l-3.7/src
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DVERSION_NUMBER="0.4.6" -I/home/pi/Desktop/MA-AU/Software-Test/testEnv/include -I/usr/include/python3.7m -c src/glpk.c -o build/temp.linux-armv7l-3.7/src/glpk.o
In file included from src/glpk.c:21:
src/lp.h:24:10: fatal error: glpk.h: Datei oder Verzeichnis nicht gefunden
#include <glpk.h>
^~~~~~~~
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
----------------------------------------
Command "/home/pi/Desktop/MA-AU/Software-Test/testEnv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-zpb2w0ff/glpk/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-5egd9fdm/install-record.txt --single-version-externally-managed --compile --install-headers /home/pi/Desktop/MA-AU/Software-Test/testEnv/include/site/python3.7/glpk" failed with error code 1 in /tmp/pip-install-zpb2w0ff/glpk/
Raspberry Pi OS:
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
Thanks for any help in advance!
When you get errors about missing .h files when trying to install a Python library, the reason is usually that the Python library depends on a C library, which the Python package cannot find — possibly because you have not installed it!
In this case, it looks like running apt-get install libglpk-dev should get the necessary libraries and headers for you.

Unable to use pip3.6 to install packages (pyconfig.h not found)

I was having trouble installing a package (plumed) using pip3.6. Specifically, with the command pip3.6 install --user plumed, I got the following error:
Collecting plumed
Using cached plumed-2.6.1.tar.gz (189 kB)
Building wheels for collected packages: plumed
Building wheel for plumed (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-cnvim96k/plumed/setup.py'"'"'; __file__='"'"'/tmp/pip-install-cnvim96k/plumed/setup.py'"'"';f=getattr(tokenize,
'"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-js3bt49u
cwd: /tmp/pip-install-cnvim96k/plumed/
Complete output (17 lines):
Module name plumed
Version number 2.6.1
using available plumed.cpp file
running bdist_wheel
running build
running build_ext
building 'plumed' extension
creating build
creating build/temp.linux-x86_64-3.6
/home/wei-tse/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -DNDEBUG -g -fwrapv -O2 -Wall -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/wei-tse/anaconda3/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/wei-tse/anaconda3/include -fPIC -I./include -I/usr/include/python3.6m -c plumed.cpp -o build/temp.linux-x86_64-3.6/plumed.o -D__PLUMED_HAS_DLOPEN -D__PLUMED_WRAPPER_LINK_RUNTIME=1 -D__PLUMED_WRAPPER_CXX=1 -D__PLUMED_WRAPPER_IMPLEMENTATION=1 -D__PLUMED_WRAPPER_EXTERN=0 -D__PLUMED_WRAPPER_CXX_DEFAULT_INVALID=1
In file included from /usr/include/python3.6m/Python.h:8:0,
from plumed.cpp:31:
/usr/include/python3.6m/pyconfig.h:3:12: fatal error: x86_64-linux-gnu/python3.6m/pyconfig.h: No such file or directory
# include <x86_64-linux-gnu/python3.6m/pyconfig.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
error: command '/home/wei-tse/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for plumed
Running setup.py clean for plumed
Failed to build plumed
Installing collected packages: plumed
Running setup.py install for plumed ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-cnvim96k/plumed/setup.py'"'"'; __file__='"'"'/tmp/pip-install-cnvim96k/plumed/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-5tvrlz45/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/wei-tse/.local/include/python3.6m/plumed
cwd: /tmp/pip-install-cnvim96k/plumed/
Complete output (17 lines):
Module name plumed
Version number 2.6.1
using available plumed.cpp file
running install
running build
running build_ext
building 'plumed' extension
creating build
creating build/temp.linux-x86_64-3.6
/home/wei-tse/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -DNDEBUG -g -fwrapv -O2 -Wall -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/wei-tse/anaconda3/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/wei-tse/anaconda3/include -fPIC
-I./include -I/usr/include/python3.6m -c plumed.cpp -o build/temp.linux-x86_64-3.6/plumed.o -D__PLUMED_HAS_DLOPEN -D__PLUMED_WRAPPER_LINK_RUNTIME=1 -D__PLUMED_WRAPPER_CXX=1 -D__PLUMED_WRAPPER_IMPLEMENTATION=1 -D__PLUMED_WRAPPER_EXTERN=0 -D__PLUMED_WRAPPER_CXX_DEFAULT_INVALID=1
In file included from /usr/include/python3.6m/Python.h:8:0,
from plumed.cpp:31:
/usr/include/python3.6m/pyconfig.h:3:12: fatal error: x86_64-linux-gnu/python3.6m/pyconfig.h: No such file or directory
# include <x86_64-linux-gnu/python3.6m/pyconfig.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
error: command '/home/wei-tse/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-cnvim96k/plumed/setup.py'"'"'; __file__='"'"'/tmp/pip-install-cnvim96k/plumed/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-5tvrlz45/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/wei-tse/.local/include/python3.6m/plumed Check the logs for full command output.
I know that there are already a lot of relevant discussions on the forum, but none of the solutions worked for me. I've tried the following solutions:
sudo apt-get install python-dev libxml2-dev libxslt-dev
sudo apt-get install python3.6-dev
export CPLUS_INCLUDE_PATH="$CPLUS_INCLUDE_PATH:/usr/include/x86_64-linux-gnu/python3.6m/pyconfig.h
The weird thing is that I had pyconfig.h in /usr/include/x86_64-linux-gnu/python3.6m/ but it couldn't be found when I used pip3.6. I was using Ubuntu 18.04, so the systematic pip was associated with Python 3.6.9. I'm wondering if there is any solution that could deal with this problem. Thanks!
For me it turned out an old package wasn't fully installed somewhere. If you get apt-get -f install anywhere in your error messages, just run that, it'll re-install your packages. Not 100% certain it'll work for everyone, but that was my specific problem with this.

Not able to upgrade pycairo in Python3 [duplicate]

This question already has answers here:
fatal error: Python.h: No such file or directory
(35 answers)
Closed 2 years ago.
I am trying to upgrade pycairo package but getting following error:
$ python3 -m pip install -U pycairo
Defaulting to user installation because normal site-packages is not writeable
Collecting pycairo
Using cached pycairo-1.19.1.tar.gz (205 kB)
Installing collected packages: pycairo
Running setup.py install for pycairo ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ho1du2qw/pycairo/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ho1du2qw/pycairo/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-21711no1/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/abcde/.local/include/python3.7m/pycairo
cwd: /tmp/pip-install-ho1du2qw/pycairo/
Complete output (19 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/cairo
copying cairo/__init__.py -> build/lib.linux-x86_64-3.7/cairo
copying cairo/__init__.pyi -> build/lib.linux-x86_64-3.7/cairo
copying cairo/py.typed -> build/lib.linux-x86_64-3.7/cairo
running build_ext
building 'cairo._cairo' extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/cairo
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPYCAIRO_VERSION_MAJOR=1 -DPYCAIRO_VERSION_MINOR=19 -DPYCAIRO_VERSION_MICRO=1 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/python3.7m -c cairo/device.c -o build/temp.linux-x86_64-3.7/cairo/device.o -Wall -Warray-bounds -Wcast-align -Wconversion -Wextra -Wformat=2 -Wformat-nonliteral -Wformat-security -Wimplicit-function-declaration -Winit-self -Winline -Wmissing-format-attribute -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpacked -Wpointer-arith -Wreturn-type -Wshadow -Wsign-compare -Wstrict-aliasing -Wundef -Wunused-but-set-variable -Wswitch-default -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-command-line-argument -fno-strict-aliasing -fvisibility=hidden -std=c99
cairo/device.c:30:10: fatal error: Python.h: No such file or directory
#include <Python.h>
^~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ho1du2qw/pycairo/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ho1du2qw/pycairo/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-21711no1/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/abcde/.local/include/python3.7m/pycairo Check the logs for full command output.
Where is the problem?
File Python.h means you have to install python-dev with C/C++ headers .h because it has to compile some C/C++ code.
On Linux Mint/Ubuntu/Debian it could be one of this command
apt install python-dev
apt install python3-dev
apt install python3.7-dev

Why is python giving me a fatal error upon downloading a package?

When trying to install Marine-traffic-api im getting an error:
Installing collected packages: ujson, Marine-Traffic-API
Running setup.py install for ujson: started
Running setup.py install for ujson: finished with status 'error'
Complete output from command /home/benjamin/PycharmProjects/ShipTracking/venv/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pycharm-packaging/ujson/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-ys30b_z8/install-record.txt --single-version-externally-managed --compile --install-headers /home/benjamin/PycharmProjects/ShipTracking/venv/include/site/python3.7/ujson:
Warning: 'classifiers' should be a list, got type 'filter'
running install
running build
running build_ext
building 'ujson' extension
creating build
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/python
creating build/temp.linux-x86_64-3.7/lib
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I./python -I./lib -I/home/benjamin/PycharmProjects/ShipTracking/venv/include -I/usr/include/python3.7m -c ./python/ujson.c -o build/temp.linux-x86_64-3.7/./python/ujson.o -D_GNU_SOURCE
In file included from ./python/ujson.c:39:0:
./python/py_defines.h:39:10: fatal error: Python.h: No such file or directory
#include <Python.h>
^~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Install the needed packages:
sudo apt-get install build-essential python3 python-dev python3-dev
After that, run:
pip install --no-cache-dir ujson

Dependency Error: netfilterqueue installation in kali [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
When attempting to install the netfilterqueue package with pip, there is an error that occurs when running pip3 install netfilterqueue.
I want to use it with pycharm.
pip3 install netfilterqueue
Collecting netfilterqueue
Using cached https://files.pythonhosted.org/packages/39/c4/8f73f70442aa4094b3c37876c96cddad2c3e74c058f6cd9cb017d37ffac0/NetfilterQueue-0.8.1.tar.gz
Building wheels for collected packages: netfilterqueue
Building wheel for netfilterqueue (setup.py) ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-s5nnbskn/netfilterqueue/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-4wdrzf63 --python-tag cp37:
running bdist_wheel
running build
running build_ext
building 'netfilterqueue' extension
creating build
creating build/temp.linux-x86_64-3.7
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.7m -c netfilterqueue.c -o build/temp.linux-x86_64-3.7/netfilterqueue.o
netfilterqueue.c:439:10: fatal error: libnetfilter_queue/linux_nfnetlink_queue.h: No such file or directory
#include "libnetfilter_queue/linux_nfnetlink_queue.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for netfilterqueue
Running setup.py clean for netfilterqueue
Failed to build netfilterqueue
Installing collected packages: netfilterqueue
Running setup.py install for netfilterqueue ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-s5nnbskn/netfilterqueue/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-cl2qydap/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
building 'netfilterqueue' extension
creating build
creating build/temp.linux-x86_64-3.7
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.7m -c netfilterqueue.c -o build/temp.linux-x86_64-3.7/netfilterqueue.o
netfilterqueue.c:439:10: fatal error: libnetfilter_queue/linux_nfnetlink_queue.h: No such file or directory
#include "libnetfilter_queue/linux_nfnetlink_queue.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-s5nnbskn/netfilterqueue/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-cl2qydap/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-s5nnbskn/netfilterqueue/
https://github.com/kti/python-netfilterqueue#installation
Before installing Netfilterqueue you must have:
Python development files.
Libnetfilter_queue development files and associated dependencies.
On Debian or Ubuntu (and I think on Kali — phd), install these files with:
apt-get install build-essential python-dev libnetfilter-queue-dev

Categories

Resources