pyv4l2
pyv4l2 copied to clipboard
Can't install pyv4l2
I've tried following the instructions for installing this package, but am running into the error in the attached file
$ sudo apt-get install libv4l-dev
...
$ pip3 install pyv4l2
Collecting pyv4l2
Using cached pyv4l2-1.0.2.tar.gz (54 kB)
Building wheels for collected packages: pyv4l2
Building wheel for pyv4l2 (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-b0ymzlkq/pyv4l2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-b0ymzlkq/pyv4l2/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-49nfon_n
cwd: /tmp/pip-install-b0ymzlkq/pyv4l2/
Complete output (113 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
creating build/lib.linux-x86_64-3.8/pyv4l2
copying pyv4l2/exceptions.py -> build/lib.linux-x86_64-3.8/pyv4l2
copying pyv4l2/__init__.py -> build/lib.linux-x86_64-3.8/pyv4l2
running build_ext
building 'pyv4l2/frame' extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/pyv4l2
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 pyv4l2/frame.c -o build/temp.linux-x86_64-3.8/pyv4l2/frame.o
pyv4l2/frame.c: In function ‘PyInit_frame’:
pyv4l2/frame.c:2757:3: warning: ‘tp_print’ is deprecated [-Wdeprecated-declarations]
2757 | __pyx_type_6pyv4l2_5frame_Frame.tp_print = 0;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/python3.8/object.h:746,
from /usr/include/python3.8/pytime.h:6,
from /usr/include/python3.8/Python.h:85,
from pyv4l2/frame.c:15:
/usr/include/python3.8/cpython/object.h:260:30: note: declared here
260 | Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
| ^~~~~~~~
pyv4l2/frame.c: In function ‘__Pyx__GetException’:
pyv4l2/frame.c:3372:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
3372 | tmp_type = tstate->exc_type;
| ^~~~~~~~
| curexc_type
pyv4l2/frame.c:3373:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
3373 | tmp_value = tstate->exc_value;
| ^~~~~~~~~
| curexc_value
pyv4l2/frame.c:3374:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
3374 | tmp_tb = tstate->exc_traceback;
| ^~~~~~~~~~~~~
| curexc_traceback
pyv4l2/frame.c:3375:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
3375 | tstate->exc_type = local_type;
| ^~~~~~~~
| curexc_type
pyv4l2/frame.c:3376:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
3376 | tstate->exc_value = local_value;
| ^~~~~~~~~
| curexc_value
pyv4l2/frame.c:3377:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
3377 | tstate->exc_traceback = local_tb;
| ^~~~~~~~~~~~~
| curexc_traceback
pyv4l2/frame.c: In function ‘__Pyx__ExceptionSwap’:
pyv4l2/frame.c:3399:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
3399 | tmp_type = tstate->exc_type;
| ^~~~~~~~
| curexc_type
pyv4l2/frame.c:3400:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
3400 | tmp_value = tstate->exc_value;
| ^~~~~~~~~
| curexc_value
pyv4l2/frame.c:3401:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
3401 | tmp_tb = tstate->exc_traceback;
| ^~~~~~~~~~~~~
| curexc_traceback
pyv4l2/frame.c:3402:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
3402 | tstate->exc_type = *type;
| ^~~~~~~~
| curexc_type
pyv4l2/frame.c:3403:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
3403 | tstate->exc_value = *value;
| ^~~~~~~~~
| curexc_value
pyv4l2/frame.c:3404:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
3404 | tstate->exc_traceback = *tb;
| ^~~~~~~~~~~~~
| curexc_traceback
pyv4l2/frame.c: In function ‘__Pyx__ExceptionSave’:
pyv4l2/frame.c:3423:21: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
3423 | *type = tstate->exc_type;
| ^~~~~~~~
| curexc_type
pyv4l2/frame.c:3424:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
3424 | *value = tstate->exc_value;
| ^~~~~~~~~
| curexc_value
pyv4l2/frame.c:3425:19: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
3425 | *tb = tstate->exc_traceback;
| ^~~~~~~~~~~~~
| curexc_traceback
pyv4l2/frame.c: In function ‘__Pyx__ExceptionReset’:
pyv4l2/frame.c:3432:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
3432 | tmp_type = tstate->exc_type;
| ^~~~~~~~
| curexc_type
pyv4l2/frame.c:3433:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
3433 | tmp_value = tstate->exc_value;
| ^~~~~~~~~
| curexc_value
pyv4l2/frame.c:3434:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
3434 | tmp_tb = tstate->exc_traceback;
| ^~~~~~~~~~~~~
| curexc_traceback
pyv4l2/frame.c:3435:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
3435 | tstate->exc_type = type;
| ^~~~~~~~
| curexc_type
pyv4l2/frame.c:3436:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
3436 | tstate->exc_value = value;
| ^~~~~~~~~
| curexc_value
pyv4l2/frame.c:3437:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
3437 | tstate->exc_traceback = tb;
| ^~~~~~~~~~~~~
| curexc_traceback
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for pyv4l2
Running setup.py clean for pyv4l2
Failed to build pyv4l2
Installing collected packages: pyv4l2
Running setup.py install for pyv4l2 ... 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-b0ymzlkq/pyv4l2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-b0ymzlkq/pyv4l2/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-ugrnwhok/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/mball/.local/include/python3.8/pyv4l2
cwd: /tmp/pip-install-b0ymzlkq/pyv4l2/
Complete output (113 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
creating build/lib.linux-x86_64-3.8/pyv4l2
copying pyv4l2/exceptions.py -> build/lib.linux-x86_64-3.8/pyv4l2
copying pyv4l2/__init__.py -> build/lib.linux-x86_64-3.8/pyv4l2
running build_ext
building 'pyv4l2/frame' extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/pyv4l2
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 pyv4l2/frame.c -o build/temp.linux-x86_64-3.8/pyv4l2/frame.o
pyv4l2/frame.c: In function ‘PyInit_frame’:
pyv4l2/frame.c:2757:3: warning: ‘tp_print’ is deprecated [-Wdeprecated-declarations]
2757 | __pyx_type_6pyv4l2_5frame_Frame.tp_print = 0;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/python3.8/object.h:746,
from /usr/include/python3.8/pytime.h:6,
from /usr/include/python3.8/Python.h:85,
from pyv4l2/frame.c:15:
/usr/include/python3.8/cpython/object.h:260:30: note: declared here
260 | Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);
| ^~~~~~~~
pyv4l2/frame.c: In function ‘__Pyx__GetException’:
pyv4l2/frame.c:3372:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
3372 | tmp_type = tstate->exc_type;
| ^~~~~~~~
| curexc_type
pyv4l2/frame.c:3373:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
3373 | tmp_value = tstate->exc_value;
| ^~~~~~~~~
| curexc_value
pyv4l2/frame.c:3374:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
3374 | tmp_tb = tstate->exc_traceback;
| ^~~~~~~~~~~~~
| curexc_traceback
pyv4l2/frame.c:3375:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
3375 | tstate->exc_type = local_type;
| ^~~~~~~~
| curexc_type
pyv4l2/frame.c:3376:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
3376 | tstate->exc_value = local_value;
| ^~~~~~~~~
| curexc_value
pyv4l2/frame.c:3377:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
3377 | tstate->exc_traceback = local_tb;
| ^~~~~~~~~~~~~
| curexc_traceback
pyv4l2/frame.c: In function ‘__Pyx__ExceptionSwap’:
pyv4l2/frame.c:3399:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
3399 | tmp_type = tstate->exc_type;
| ^~~~~~~~
| curexc_type
pyv4l2/frame.c:3400:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
3400 | tmp_value = tstate->exc_value;
| ^~~~~~~~~
| curexc_value
pyv4l2/frame.c:3401:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
3401 | tmp_tb = tstate->exc_traceback;
| ^~~~~~~~~~~~~
| curexc_traceback
pyv4l2/frame.c:3402:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
3402 | tstate->exc_type = *type;
| ^~~~~~~~
| curexc_type
pyv4l2/frame.c:3403:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
3403 | tstate->exc_value = *value;
| ^~~~~~~~~
| curexc_value
pyv4l2/frame.c:3404:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
3404 | tstate->exc_traceback = *tb;
| ^~~~~~~~~~~~~
| curexc_traceback
pyv4l2/frame.c: In function ‘__Pyx__ExceptionSave’:
pyv4l2/frame.c:3423:21: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
3423 | *type = tstate->exc_type;
| ^~~~~~~~
| curexc_type
pyv4l2/frame.c:3424:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
3424 | *value = tstate->exc_value;
| ^~~~~~~~~
| curexc_value
pyv4l2/frame.c:3425:19: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
3425 | *tb = tstate->exc_traceback;
| ^~~~~~~~~~~~~
| curexc_traceback
pyv4l2/frame.c: In function ‘__Pyx__ExceptionReset’:
pyv4l2/frame.c:3432:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
3432 | tmp_type = tstate->exc_type;
| ^~~~~~~~
| curexc_type
pyv4l2/frame.c:3433:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
3433 | tmp_value = tstate->exc_value;
| ^~~~~~~~~
| curexc_value
pyv4l2/frame.c:3434:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
3434 | tmp_tb = tstate->exc_traceback;
| ^~~~~~~~~~~~~
| curexc_traceback
pyv4l2/frame.c:3435:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
3435 | tstate->exc_type = type;
| ^~~~~~~~
| curexc_type
pyv4l2/frame.c:3436:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
3436 | tstate->exc_value = value;
| ^~~~~~~~~
| curexc_value
pyv4l2/frame.c:3437:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
3437 | tstate->exc_traceback = tb;
| ^~~~~~~~~~~~~
| curexc_traceback
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-b0ymzlkq/pyv4l2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-b0ymzlkq/pyv4l2/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-ugrnwhok/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/mball/.local/include/python3.8/pyv4l2 Check the logs for full command output.
If anyone get into this error trying to install from pip or repo
- try to build the pyv4l2 package from source running pyv4l2/setup.py file with --use-cython argument.
- Install the pip package from source passing the folder path to pip.
pip install -e <local project path>