Closed alitoufighi closed 3 years ago
@alitoufighi Hi, at first sight, it looks like you have installed an incompatible libuvc version. Could you let us know how you installed libuvc?
Hi. Thank you for your quick response.
I just noticed that I had installed libuvc-dev
from ubuntu repositories. I uninstalled it and built it from your fork and it installed successfully.
I'll close the issue.
I am seeing the same error when trying to install pyuvc on a Jetson nano (Ubuntu 18.04, python 3.6.9). I have installed the pupil-lab fork of libuvc
.
Any idea why this could be happening?
@AvinashNargund you might have both libuvc-dev
and the fork installed, and while building pyuvc, it uses libuvc-dev
.
I recommend
1) uninstalling libuvc-dev
2) Follow the latest "Install from source instructions" with a fresh clone
If you continue having issues, please share the full build log.
I have only the Pupil lab fork of the libuvc
installed. I followed the instructions from the page you linked and the setup fails with the error /tmp/pip-c_bmt_qa-build/pyuvc-source/uvc_bindings.pyx:705:30: undeclared name not builtin: TimeoutError
Here's the full log -
Processing ./pyuvc
Requirement already satisfied: numpy in /usr/local/lib/python3.6/dist-packages (from pupil-labs-uvc==0.0.0)
Requirement already satisfied: importlib-metadata in /usr/local/lib/python3.6/dist-packages (from pupil-labs-uvc==0.0.0)
Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.6/dist-packages (from importlib-metadata->pupil-labs-uvc==0.0.0)
Requirement already satisfied: typing-extensions>=3.6.4; python_version < "3.8" in /usr/local/lib/python3.6/dist-packages (from importlib-metadata->pupil-labs-uvc==0.0.0)
Installing collected packages: pupil-labs-uvc
Running setup.py install for pupil-labs-uvc: started
Running setup.py install for pupil-labs-uvc: finished with status 'error'
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-c_bmt_qa-build/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-0iq83u0w-record/install-record.txt --single-version-externally-managed --compile:
/usr/local/lib/python3.6/dist-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
setuptools.SetuptoolsDeprecationWarning,
--------------------------------------------------------------------------------
-- Trying 'Ninja' generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
Not searching for unused variables given on the command line.
CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
-- Configuring incomplete, errors occurred!
See also "/tmp/pip-c_bmt_qa-build/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying 'Ninja' generator - failure
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Trying 'Unix Makefiles' generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
Not searching for unused variables given on the command line.
-- The C compiler identification is GNU 7.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- The CXX compiler identification is GNU 7.5.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/pip-c_bmt_qa-build/_cmake_test_compile/build
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying 'Unix Makefiles' generator - success
--------------------------------------------------------------------------------
Configuring Project
Working directory:
/tmp/pip-c_bmt_qa-build/_skbuild/linux-aarch64-3.6/cmake-build
Command:
/usr/bin/cmake /tmp/pip-c_bmt_qa-build/pyuvc-source -G 'Unix Makefiles' -DCMAKE_INSTALL_PREFIX:PATH=/tmp/pip-c_bmt_qa-build/_skbuild/linux-aarch64-3.6/cmake-install/pyuvc-source/uvc -DPYTHON_VERSION_STRING:STRING=3.6.9 -DSKBUILD:INTERNAL=TRUE -DCMAKE_MODULE_PATH:PATH=/usr/local/lib/python3.6/dist-packages/skbuild/resources/cmake -DPYTHON_EXECUTABLE:PATH=/usr/bin/python3 -DPYTHON_INCLUDE_DIR:PATH=/usr/include/python3.6m -DPYTHON_LIBRARY:PATH=/usr/lib/aarch64-linux-gnu/libpython3.6m.so -DPython_EXECUTABLE:PATH=/usr/bin/python3 -DPython_ROOT_DIR:PATH=/usr -DPython_INCLUDE_DIR:PATH=/usr/include/python3.6m -DPython_FIND_REGISTRY:STRING=NEVER -DPython_NumPy_INCLUDE_DIRS:PATH=/usr/local/lib/python3.6/dist-packages/numpy/core/include -DPython3_EXECUTABLE:PATH=/usr/bin/python3 -DPython3_ROOT_DIR:PATH=/usr -DPython3_INCLUDE_DIR:PATH=/usr/include/python3.6m -DPython3_FIND_REGISTRY:STRING=NEVER -DPython3_NumPy_INCLUDE_DIRS:PATH=/usr/local/lib/python3.6/dist-packages/numpy/core/include -DUVC_DEBUGGING=OFF -DFORCE_LOCAL_LIBUVC_BUILD=OFF -DCMAKE_BUILD_TYPE:STRING=Release
-- The C compiler identification is GNU 7.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- FORCE_LOCAL_LIBUVC_BUILD=OFF
-- Looking for libuvc...
-- Setting RPATH to /usr/local/lib
-- Found PythonInterp: /usr/bin/python3 (found version "3.6.9")
-- Found PythonLibs: /usr/lib/aarch64-linux-gnu/libpython3.6m.so (found version "3.6.9")
-- Found Cython: /usr/bin/cython
-- Found NumPy: /usr/include (found version "1.19.5")
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for module 'libturbojpeg'
-- Found libturbojpeg, version 1.5.1
-- Checking for module 'libusb-1.0'
-- Found libusb-1.0, version 1.0.21
-- Performing Test Weak Link MODULE -> SHARED (gnu_ld_ignore) - Success
_modinit_prefix:PyInit_
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
Python3_EXECUTABLE
Python3_FIND_REGISTRY
Python3_INCLUDE_DIR
Python3_NumPy_INCLUDE_DIRS
Python3_ROOT_DIR
Python_FIND_REGISTRY
Python_INCLUDE_DIR
Python_NumPy_INCLUDE_DIRS
Python_ROOT_DIR
SKBUILD
UVC_DEBUGGING
-- Build files have been written to: /tmp/pip-c_bmt_qa-build/_skbuild/linux-aarch64-3.6/cmake-build
[ 33%] Generating C source uvc_bindings.c
Error compiling Cython file:
------------------------------------------------------------
...
cdef uvc.uvc_frame *uvc_frame = NULL
#when this is called we will overwrite the last jpeg buffer! This can be dangerous!
with nogil:
status = uvc.uvc_stream_get_frame(self.strmh, &uvc_frame, timeout_usec)
if status == uvc.UVC_ERROR_TIMEOUT:
raise TimeoutError
^
------------------------------------------------------------
/tmp/pip-c_bmt_qa-build/pyuvc-source/uvc_bindings.pyx:705:30: undeclared name not builtin: TimeoutError
CMakeFiles/uvc_bindings.dir/build.make:76: recipe for target 'uvc_bindings.c' failed
make[2]: *** [uvc_bindings.c] Error 1
make[2]: *** Deleting file 'uvc_bindings.c'
CMakeFiles/Makefile2:82: recipe for target 'CMakeFiles/uvc_bindings.dir/all' failed
make[1]: *** [CMakeFiles/uvc_bindings.dir/all] Error 2
Makefile:135: recipe for target 'all' failed
make: *** [all] Error 2
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/skbuild/setuptools_wrap.py", line 649, in setup
cmkr.make(make_args, install_target=cmake_install_target, env=env)
File "/usr/local/lib/python3.6/dist-packages/skbuild/cmaker.py", line 686, in make
self.make_impl(clargs=clargs, config=config, source_dir=source_dir, install_target=install_target, env=env)
File "/usr/local/lib/python3.6/dist-packages/skbuild/cmaker.py", line 718, in make_impl
"An error occurred while building with CMake.\n"
An error occurred while building with CMake.
Command:
/usr/bin/cmake --build . --target install --config Release --
Install target:
install
Source directory:
/tmp/pip-c_bmt_qa-build
Working directory:
/tmp/pip-c_bmt_qa-build/_skbuild/linux-aarch64-3.6/cmake-build
Please check the install target is valid and see CMake's output for more information.
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-c_bmt_qa-build/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-0iq83u0w-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-c_bmt_qa-build/
@AvinashNargund Hey, few notes:
Please uninstall the libuvc fork as it might be an older version, leading to incompatibilities later on
pyuvc can build the correct libuvc version as part of the wheel process, but needs FORCE_LOCAL_LIBUVC_BUILD
to be ON
, you have it off right now
-- FORCE_LOCAL_LIBUVC_BUILD=OFF
Make sure to run this command in the same shell as the pip install
call. It is not session persistent.
export FORCE_LOCAL_LIBUVC_BUILD=ON
undeclared name not builtin: TimeoutError
- I have not seen this issue before and don't have an immediate solution for this
pupil-labs-uvc==0.0.0
- Can you check whether the tags were cloned correctly? cd ./pyuvc; git tag
@AvinashNargund Please also try using a newer Python version
Thanks, will try again with these pointers in mind.
I wanted to install uvc as a dependency of pupil project. Using Python 3.8 and pip v20.2.4, when I run
pip install git+https://github.com/pupil-labs/pyuvc@v0.14.1
I get:The error is apparently in this line:
error: too many arguments to function ‘uvc_stream_start’
. Is it related to my Python version, or something with Cython or numpy caused the problem?