'Building wheel for pypcap (setup.py) ... error , Failed to build pypcap
Building wheel for pypcap (setup.py) ... error ERROR: Command errored out with exit status 1: command: /root/miniconda3/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-1310qmd2/pypcap_3db746992aa844b685f5aeccd41d561d/setup.py'"'"'; file='"'"'/tmp/pip-install-1310qmd2/pypcap_3db746992aa844b685f5aeccd41d561d/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-v9f1tzxx cwd: /tmp/pip-install-1310qmd2/pypcap_3db746992aa844b685f5aeccd41d561d/ Complete output (166 lines): Found pcap headers in /usr/include/pcap.h Found libraries in /usr/lib/x86_64-linux-gnu/libpcap.a found pcap_get_tstamp_precision function found pcap_setdirection found pcap_setnonblock found pcap_compile_nopcap function /root/miniconda3/lib/python3.9/site-packages/setuptools/dist.py:717: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead warnings.warn( running bdist_wheel running build running build_ext building 'pcap' extension creating build creating build/temp.linux-x86_64-3.9 gcc -pthread -B /root/miniconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /root/miniconda3/include -I/root/miniconda3/include -fPIC -O2 -isystem /root/miniconda3/include -fPIC -DHAVE_PCAP_TSTAMP_PRECISION=1 -DHAVE_PCAP_SETDIRECTION=1 -DHAVE_PCAP_SETNONBLOCK=1 -DHAVE_PCAP_COMPILE_NOPCAP=1 -I/usr/include -I/root/miniconda3/include/python3.9 -c pcap.c -o build/temp.linux-x86_64-3.9/pcap.o pcap.c: In function ‘__pyx_pf_4pcap_3bpf_2filter’: pcap.c:3065:3: warning: ‘PyObject_AsCharBuffer’ is deprecated [-Wdeprecated-declarations] 3065 | __pyx_t_1 = ((PyObject_AsCharBuffer(__pyx_v_buf, ((char const **)(&__pyx_v_p)), (&__pyx_v_n)) < 0) != 0); | ^~~~~~~~~ In file included from /root/miniconda3/include/python3.9/Python.h:160, from pcap.c:4: /root/miniconda3/include/python3.9/abstract.h:326:17: note: declared here 326 | PyAPI_FUNC(int) PyObject_AsCharBuffer(PyObject *obj, | ^~~~~~~~~~~~~~~~~~~~~ pcap.c: In function ‘__Pyx_modinit_type_init_code’: pcap.c:22411:36: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’ 22411 | __pyx_type_4pcap_pcap_handler_ctx.tp_print = 0; | ^ pcap.c:22419:23: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’ 22419 | __pyx_type_4pcap_bpf.tp_print = 0; | ^ pcap.c:22427:24: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’ 22427 | __pyx_type_4pcap_pcap.tp_print = 0; | ^ pcap.c:22437:25: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’ 22437 | __pyx_type___pyx_array.tp_print = 0; | ^ pcap.c:22442:31: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’ 22442 | __pyx_type___pyx_MemviewEnum.tp_print = 0; | ^ pcap.c:22457:30: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’ 22457 | __pyx_type___pyx_memoryview.tp_print = 0; | ^ pcap.c:22470:35: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’ 22470 | __pyx_type___pyx_memoryviewslice.tp_print = 0; | ^ pcap.c: In function ‘__Pyx_ParseOptionalKeywords’: pcap.c:24116:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations] 24116 | (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : | ^ In file included from /root/miniconda3/include/python3.9/unicodeobject.h:1026, from /root/miniconda3/include/python3.9/Python.h:106, from pcap.c:4: /root/miniconda3/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here 446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~ pcap.c:24116:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations] 24116 | (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : | ^ In file included from /root/miniconda3/include/python3.9/unicodeobject.h:1026, from /root/miniconda3/include/python3.9/Python.h:106, from pcap.c:4: /root/miniconda3/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here 580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode( | ^~~~~~~~~~~~~~~~~~~ pcap.c:24116:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations] 24116 | (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : | ^ In file included from /root/miniconda3/include/python3.9/unicodeobject.h:1026, from /root/miniconda3/include/python3.9/Python.h:106, from pcap.c:4: /root/miniconda3/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here 446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~ pcap.c:24116:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations] 24116 | (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : | ^ In file included from /root/miniconda3/include/python3.9/unicodeobject.h:1026, from /root/miniconda3/include/python3.9/Python.h:106, from pcap.c:4: /root/miniconda3/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here 446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~ pcap.c:24116:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations] 24116 | (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : | ^ In file included from /root/miniconda3/include/python3.9/unicodeobject.h:1026, from /root/miniconda3/include/python3.9/Python.h:106, from pcap.c:4: /root/miniconda3/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here 580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode( | ^~~~~~~~~~~~~~~~~~~ pcap.c:24116:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations] 24116 | (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : | ^ In file included from /root/miniconda3/include/python3.9/unicodeobject.h:1026, from /root/miniconda3/include/python3.9/Python.h:106, from pcap.c:4: /root/miniconda3/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here 446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~ pcap.c:24132:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations] 24132 | (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : | ^ In file included from /root/miniconda3/include/python3.9/unicodeobject.h:1026, from /root/miniconda3/include/python3.9/Python.h:106, from pcap.c:4: /root/miniconda3/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here 446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~ pcap.c:24132:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations] 24132 | (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : | ^ In file included from /root/miniconda3/include/python3.9/unicodeobject.h:1026, from /root/miniconda3/include/python3.9/Python.h:106, from pcap.c:4: /root/miniconda3/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here 580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode( | ^~~~~~~~~~~~~~~~~~~ pcap.c:24132:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations] 24132 | (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : | ^ In file included from /root/miniconda3/include/python3.9/unicodeobject.h:1026, from /root/miniconda3/include/python3.9/Python.h:106, from pcap.c:4: /root/miniconda3/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here 446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~ pcap.c:24132:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations] 24132 | (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : | ^ In file included from /root/miniconda3/include/python3.9/unicodeobject.h:1026, from /root/miniconda3/include/python3.9/Python.h:106, from pcap.c:4: /root/miniconda3/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here 446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~ pcap.c:24132:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations] 24132 | (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : | ^ In file included from /root/miniconda3/include/python3.9/unicodeobject.h:1026, from /root/miniconda3/include/python3.9/Python.h:106, from pcap.c:4: /root/miniconda3/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here 580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode( | ^~~~~~~~~~~~~~~~~~~ pcap.c:24132:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations] 24132 | (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : | ^ In file included from /root/miniconda3/include/python3.9/unicodeobject.h:1026, from /root/miniconda3/include/python3.9/Python.h:106, from pcap.c:4: /root/miniconda3/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here 446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject op) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~ pcap.c: In function ‘__Pyx_decode_c_string’: pcap.c:25062:9: warning: ‘PyUnicode_FromUnicode’ is deprecated [-Wdeprecated-declarations] 25062 | return PyUnicode_FromUnicode(NULL, 0); | ^~~~~~ In file included from /root/miniconda3/include/python3.9/unicodeobject.h:1026, from /root/miniconda3/include/python3.9/Python.h:106, from pcap.c:4: /root/miniconda3/include/python3.9/cpython/unicodeobject.h:551:42: note: declared here 551 | Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject) PyUnicode_FromUnicode( | ^~~~~~~~~~~~~~~~~~~~~ error: command '/usr/bin/gcc' failed with exit code 1
ERROR: Failed building wheel for pypcap Running setup.py clean for pypcap Successfully built NetfilterQueue Failed to build pypcap Installing collected packages: pypcap, pyinotify, pycrypto, Pillow, pefile, NetfilterQueue, netaddr, msgpack-python, lxml, ipy, Flask, dnspython, dnslib, configobj, chardet, capstone, beautifulsoup4
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
