pupil-labs / PyAV

Pythonic bindings for FFmpeg.
http://mikeboers.github.io/PyAV/
BSD 3-Clause "New" or "Revised" License
2 stars 8 forks source link

Failed building wheel for av #26

Closed CobeA527 closed 2 years ago

CobeA527 commented 2 years ago

Hello everyone,

I tried to install pupil from source. But during the install via the requirements.txt (pip install -r requirements.txt) i get the following error:

PyAV: 0.4.6 b'v0.4.6' Python: b'3.7.10 (default, Nov 16 2021, 17:24:06) \n[Clang 12.0.5 (clang-1205.0.22.11)]' platform: Darwin-20.5.0-x86_64-i386-64bit extension_extra: include_dirs: [b'/usr/local/Cellar/ffmpeg/4.4.1_3/include', b'include', b'/Users/korbiniankunst/.pyenv/versions/3.7.10/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m'] libraries: [b'avcodec', b'avdevice', b'avfilter', b'avformat', b'avutil', b'swresample', b'swscale'] library_dirs: [b'/usr/local/Cellar/ffmpeg/4.4.1_3/lib'] config_macros: PYAV_COMMIT_STR="b'v0.4.6'" PYAV_HAVE_AVCODEC_SEND_PACKET=0 PYAV_HAVE_AVFORMAT_ALLOC_OUTPUT_CONTEXT2=0 PYAV_HAVE_AVFORMAT_CLOSE_INPUT=0 PYAV_HAVE_AVFRAME__MB_TYPE=0 PYAV_HAVE_AV_CALLOC=0 PYAV_HAVE_AV_FRAME_GET_BEST_EFFORT_TIMESTAMP=0 PYAV_HAVE_AV_OPT_TYPE_BOOL=1 PYAV_HAVE_LIBAVRESAMPLE=0 PYAV_HAVE_LIBSWRESAMPLE=1 PYAV_VERSION=0.4.6 PYAV_VERSION_STR="0.4.6" ERROR: Failed building wheel for av

  1. Actually i am using a MacBook M1 with Rosetta.
  2. I get the same error for the uvc install.
  3. If i install both packages via pip (pip install av uvc) i don't get an error
  4. I added the file pyproject.toml to pupil

Does anyone has an advice for me?

Kind regards,

Cobe

Full output
korbiniankunst@MBPvonKorbinian pupil % pip install -r requirements.txt Ignoring win-inet-pton: markers 'platform_system == "Windows"' don't match your environment Ignoring opencv-python: markers 'platform_system == "Windows"' don't match your environment Collecting av@ git+https://github.com/pupil-labs/PyAV@v0.4.6 Cloning https://github.com/pupil-labs/PyAV (to revision v0.4.6) to /private/var/folders/n8/8gkd2vfs4j30gq83bhnc95sm0000gn/T/pip-install-ricfwxuw/av_72a8f6b1b9ed4d749e6f61dff6f9dd7e Running command git clone --filter=blob:none -q https://github.com/pupil-labs/PyAV /private/var/folders/n8/8gkd2vfs4j30gq83bhnc95sm0000gn/T/pip-install-ricfwxuw/av_72a8f6b1b9ed4d749e6f61dff6f9dd7e Running command git checkout -q 7caff796ed6919aff97f83f5282e306596a26d18 Resolved https://github.com/pupil-labs/PyAV to commit 7caff796ed6919aff97f83f5282e306596a26d18 Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... done Ignoring av: markers 'platform_system == "Windows"' don't match your environment Collecting uvc@ git+https://github.com/pupil-labs/pyuvc@v0.14.1 Cloning https://github.com/pupil-labs/pyuvc (to revision v0.14.1) to /private/var/folders/n8/8gkd2vfs4j30gq83bhnc95sm0000gn/T/pip-install-ricfwxuw/uvc_975aeb6c11df4f8d8c9d2328df57bd1c Running command git clone --filter=blob:none -q https://github.com/pupil-labs/pyuvc /private/var/folders/n8/8gkd2vfs4j30gq83bhnc95sm0000gn/T/pip-install-ricfwxuw/uvc_975aeb6c11df4f8d8c9d2328df57bd1c Running command git checkout -q 0f42d8eb8867394d13e4b14f20f0112d53d46973 Resolved https://github.com/pupil-labs/pyuvc to commit 0f42d8eb8867394d13e4b14f20f0112d53d46973 Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Ignoring uvc: markers 'platform_system == "Windows"' don't match your environment Requirement already satisfied: msgpack>=1.0.0 in /Users/korbiniankunst/.pyenv/versions/3.7.10/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from -r requirements.txt (line 4)) (1.0.3) Collecting numexpr Using cached numexpr-2.8.0-cp37-cp37m-macosx_10_9_x86_64.whl (101 kB) Requirement already satisfied: packaging>=20.0 in /Users/korbiniankunst/.pyenv/versions/3.7.10/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from -r requirements.txt (line 6)) (21.2) Collecting psutil Using cached psutil-5.8.0-cp37-cp37m-macosx_10_9_x86_64.whl (236 kB) Collecting pyaudio Using cached PyAudio-0.2.11-cp37-cp37m-macosx_11_0_x86_64.whl Requirement already satisfied: pyopengl in /Users/korbiniankunst/.pyenv/versions/3.7.10/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from -r requirements.txt (line 9)) (3.1.5) Requirement already satisfied: pyzmq in /Users/korbiniankunst/.pyenv/versions/3.7.10/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from -r requirements.txt (line 10)) (22.3.0) Collecting scikit-learn Using cached scikit_learn-1.0.1-cp37-cp37m-macosx_10_13_x86_64.whl (7.9 MB) Requirement already satisfied: scipy in /Users/korbiniankunst/.pyenv/versions/3.7.10/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from -r requirements.txt (line 12)) (1.7.2) Collecting cython Using cached Cython-0.29.24-cp37-cp37m-macosx_10_9_x86_64.whl (1.9 MB) Collecting glfw>=2.0.0 Using cached glfw-2.4.0-py2.py27.py3.py30.py31.py32.py33.py34.py35.py36.py37.py38-none-macosx_10_6_intel.whl (95 kB) Collecting ndsi==1.4.* Using cached ndsi-1.4.3-cp37-cp37m-macosx_10_9_x86_64.whl (20.0 MB) Collecting zeromq-pyre>=0.3.4 Using cached zeromq_pyre-0.3.4-py3-none-any.whl Collecting cysignals Using cached cysignals-1.11.1-cp37-cp37m-macosx_11_0_x86_64.whl Collecting pupil-apriltags==1.0.4 Using cached pupil_apriltags-1.0.4-cp37-cp37m-macosx_10_13_x86_64.whl (8.2 MB) Collecting pupil-detectors==2.0.* Using cached pupil_detectors-2.0.1-cp37-cp37m-macosx_11_0_x86_64.whl Collecting pye3d==0.3.0 Using cached pye3d-0.3.0-cp37-cp37m-macosx_10_9_x86_64.whl (18.2 MB) Collecting pyglui>=1.31.0 Using cached pyglui-1.31.0-cp37-cp37m-macosx_10_9_x86_64.whl (2.8 MB) Requirement already satisfied: numpy in /Users/korbiniankunst/.pyenv/versions/3.7.10/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from ndsi==1.4.*->-r requirements.txt (line 15)) (1.21.4) Collecting sortedcontainers Using cached sortedcontainers-2.4.0-py2.py3-none-any.whl (29 kB) Requirement already satisfied: pyparsing<3,>=2.0.2 in /Users/korbiniankunst/.pyenv/versions/3.7.10/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from packaging>=20.0->-r requirements.txt (line 6)) (2.4.7) Collecting joblib>=0.11 Using cached joblib-1.1.0-py2.py3-none-any.whl (306 kB) Collecting threadpoolctl>=2.0.0 Using cached threadpoolctl-3.0.0-py3-none-any.whl (14 kB) Collecting ipaddress Using cached ipaddress-1.0.23-py2.py3-none-any.whl (18 kB) Building wheels for collected packages: av, uvc Building wheel for av (pyproject.toml) ... error ERROR: Command errored out with exit status 1: command: /Users/korbiniankunst/.pyenv/versions/3.7.10/Library/Frameworks/Python.framework/Versions/3.7/bin/python /Users/korbiniankunst/.pyenv/versions/3.7.10/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /var/folders/n8/8gkd2vfs4j30gq83bhnc95sm0000gn/T/tmp82do8oje cwd: /private/var/folders/n8/8gkd2vfs4j30gq83bhnc95sm0000gn/T/pip-install-ricfwxuw/av_72a8f6b1b9ed4d749e6f61dff6f9dd7e Complete output (66 lines): running bdist_wheel running build running build_py creating build creating build/lib.macosx-11.4-x86_64-3.7 creating build/lib.macosx-11.4-x86_64-3.7/av copying av/__init__.py -> build/lib.macosx-11.4-x86_64-3.7/av copying av/__main__.py -> build/lib.macosx-11.4-x86_64-3.7/av creating build/lib.macosx-11.4-x86_64-3.7/av/video copying av/video/__init__.py -> build/lib.macosx-11.4-x86_64-3.7/av/video creating build/lib.macosx-11.4-x86_64-3.7/av/codec copying av/codec/__init__.py -> build/lib.macosx-11.4-x86_64-3.7/av/codec creating build/lib.macosx-11.4-x86_64-3.7/av/container copying av/container/__init__.py -> build/lib.macosx-11.4-x86_64-3.7/av/container creating build/lib.macosx-11.4-x86_64-3.7/av/audio copying av/audio/__init__.py -> build/lib.macosx-11.4-x86_64-3.7/av/audio creating build/lib.macosx-11.4-x86_64-3.7/av/subtitles copying av/subtitles/__init__.py -> build/lib.macosx-11.4-x86_64-3.7/av/subtitles creating build/lib.macosx-11.4-x86_64-3.7/av/filter copying av/filter/__init__.py -> build/lib.macosx-11.4-x86_64-3.7/av/filter creating build/lib.macosx-11.4-x86_64-3.7/av/data copying av/data/__init__.py -> build/lib.macosx-11.4-x86_64-3.7/av/data running build_ext running reflect running config looking for avformat_open_input... missing looking for pyav_function_should_not_exist... missing looking for av_calloc... missing looking for av_frame_get_best_effort_timestamp... missing looking for avformat_alloc_output_context2... missing looking for avformat_close_input... missing looking for avcodec_send_packet... missing looking for AV_OPT_TYPE_INT...found looking for PYAV_ENUM_SHOULD_NOT_EXIST...missing looking for AV_OPT_TYPE_BOOL...found looking for AVStream.index... found looking for PyAV.struct_should_not_exist... missing looking for AVFrame.mb_type... missing We didn't find `avformat_open_input` in the libraries. We look for it only as a sanity check to make sure the build process is working as expected. It is not, so we must abort. Please open a ticket at https://github.com/mikeboers/PyAV/issues with the following information: PyAV: 0.4.6 b'v0.4.6' Python: b'3.7.10 (default, Nov 16 2021, 17:24:06) \\n[Clang 12.0.5 (clang-1205.0.22.11)]' platform: Darwin-20.5.0-x86_64-i386-64bit extension_extra: include_dirs: [b'/usr/local/Cellar/ffmpeg/4.4.1_3/include', b'include', b'/Users/korbiniankunst/.pyenv/versions/3.7.10/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m'] libraries: [b'avcodec', b'avdevice', b'avfilter', b'avformat', b'avutil', b'swresample', b'swscale'] library_dirs: [b'/usr/local/Cellar/ffmpeg/4.4.1_3/lib'] config_macros: PYAV_COMMIT_STR="b'v0.4.6'" PYAV_HAVE_AVCODEC_SEND_PACKET=0 PYAV_HAVE_AVFORMAT_ALLOC_OUTPUT_CONTEXT2=0 PYAV_HAVE_AVFORMAT_CLOSE_INPUT=0 PYAV_HAVE_AVFRAME__MB_TYPE=0 PYAV_HAVE_AV_CALLOC=0 PYAV_HAVE_AV_FRAME_GET_BEST_EFFORT_TIMESTAMP=0 PYAV_HAVE_AV_OPT_TYPE_BOOL=1 PYAV_HAVE_LIBAVRESAMPLE=0 PYAV_HAVE_LIBSWRESAMPLE=1 PYAV_VERSION=0.4.6 PYAV_VERSION_STR="0.4.6" ---------------------------------------- ERROR: Failed building wheel for av Building wheel for uvc (pyproject.toml) ... error ERROR: Command errored out with exit status 1: command: /Users/korbiniankunst/.pyenv/versions/3.7.10/Library/Frameworks/Python.framework/Versions/3.7/bin/python /Users/korbiniankunst/.pyenv/versions/3.7.10/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /var/folders/n8/8gkd2vfs4j30gq83bhnc95sm0000gn/T/tmpjhp3abdk cwd: /private/var/folders/n8/8gkd2vfs4j30gq83bhnc95sm0000gn/T/pip-install-ricfwxuw/uvc_975aeb6c11df4f8d8c9d2328df57bd1c Complete output (61 lines): running bdist_wheel running build running build_ext building 'uvc' extension creating build creating build/temp.macosx-11.4-x86_64-3.7 clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/private/var/folders/n8/8gkd2vfs4j30gq83bhnc95sm0000gn/T/pip-build-env-xnwjgprm/overlay/lib/python3.7/site-packages/numpy/core/include -I/usr/local/opt/jpeg-turbo/include/ -I/Users/korbiniankunst/.pyenv/versions/3.7.10/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c uvc.c -o build/temp.macosx-11.4-x86_64-3.7/uvc.o In file included from uvc.c:657: In file included from /private/var/folders/n8/8gkd2vfs4j30gq83bhnc95sm0000gn/T/pip-build-env-xnwjgprm/overlay/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4: In file included from /private/var/folders/n8/8gkd2vfs4j30gq83bhnc95sm0000gn/T/pip-build-env-xnwjgprm/overlay/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12: In file included from /private/var/folders/n8/8gkd2vfs4j30gq83bhnc95sm0000gn/T/pip-build-env-xnwjgprm/overlay/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1969: /private/var/folders/n8/8gkd2vfs4j30gq83bhnc95sm0000gn/T/pip-build-env-xnwjgprm/overlay/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings] #warning "Using deprecated NumPy API, disable it with " \ ^ uvc.c:15160:68: error: too few arguments to function call, expected 3, have 2 __pyx_v_error = uvc_open(__pyx_v_self->dev, (&__pyx_v_self->devh)); ~~~~~~~~ ^ /usr/local/include/libuvc/libuvc.h:515:13: note: 'uvc_open' declared here uvc_error_t uvc_open( ^ uvc.c:15562:155: error: too few arguments to function call, expected 7, have 6 __pyx_v_status = uvc_get_stream_ctrl_format_size(__pyx_v_self->devh, (&__pyx_v_self->ctrl), UVC_FRAME_FORMAT_COMPRESSED, __pyx_t_3, __pyx_t_4, __pyx_t_5); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ /usr/local/include/libuvc/libuvc.h:542:13: note: 'uvc_get_stream_ctrl_format_size' declared here uvc_error_t uvc_get_stream_ctrl_format_size( ^ uvc.c:15728:106: error: too few arguments to function call, expected 4, have 3 __pyx_v_status = uvc_stream_open_ctrl(__pyx_v_self->devh, (&__pyx_v_self->strmh), (&__pyx_v_self->ctrl)); ~~~~~~~~~~~~~~~~~~~~ ^ /usr/local/include/libuvc/libuvc.h:574:13: note: 'uvc_stream_open_ctrl' declared here uvc_error_t uvc_stream_open_ctrl(uvc_device_handle_t *devh, uvc_stream_handle_t **strmh, uvc_stream_ctrl_t *ctrl, int should_detach_kernel_driver); ^ uvc.c:16895:42: warning: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'int' [-Wsign-compare] __pyx_t_7 = ((__pyx_v_uvc_frame->width == __pyx_v_j_width) != 0); ~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~ uvc.c:16901:43: warning: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'int' [-Wsign-compare] __pyx_t_7 = ((__pyx_v_uvc_frame->height == __pyx_v_j_height) != 0); ~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~ uvc.c:17077:26: warning: assigning to 'uvc_input_terminal_t *' (aka 'struct uvc_input_terminal *') from 'const uvc_input_terminal_t *' (aka 'const struct uvc_input_terminal *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers] __pyx_v_input_terminal = uvc_get_input_terminals(__pyx_v_self->devh); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ uvc.c:17086:27: warning: assigning to 'uvc_output_terminal_t *' (aka 'struct uvc_output_terminal *') from 'const uvc_output_terminal_t *' (aka 'const struct uvc_output_terminal *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers] __pyx_v_output_terminal = uvc_get_output_terminals(__pyx_v_self->devh); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ uvc.c:17095:27: warning: assigning to 'uvc_processing_unit_t *' (aka 'struct uvc_processing_unit *') from 'const uvc_processing_unit_t *' (aka 'const struct uvc_processing_unit *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers] __pyx_v_processing_unit = uvc_get_processing_units(__pyx_v_self->devh); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ uvc.c:17104:26: warning: assigning to 'uvc_extension_unit_t *' (aka 'struct uvc_extension_unit *') from 'const uvc_extension_unit_t *' (aka 'const struct uvc_extension_unit *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers] __pyx_v_extension_unit = uvc_get_extension_units(__pyx_v_self->devh); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ uvc.c:17679:23: warning: assigning to 'uvc_format_desc_t *' (aka 'struct uvc_format_desc *') from 'const uvc_format_desc_t *' (aka 'const struct uvc_format_desc *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers] __pyx_v_format_desc = uvc_get_format_descs(__pyx_v_self->devh); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ uvc.c:20747:56: error: too few arguments to function call, expected 3, have 2 __pyx_v_error = uvc_open(__pyx_v_dev, (&__pyx_v_devh)); ~~~~~~~~ ^ /usr/local/include/libuvc/libuvc.h:515:13: note: 'uvc_open' declared here uvc_error_t uvc_open( ^ 8 warnings and 4 errors generated. error: command 'clang' failed with exit status 1 ---------------------------------------- ERROR: Failed building wheel for uvc Failed to build av uvc ERROR: Could not build wheels for av, uvc, which is required to install pyproject.toml-based projects
papr commented 2 years ago

Hi, please see my notes below:

CobeA527 commented 2 years ago

Thanks for your suggestions!

The bundled versions works. I am trying to write a Plugin now.

papr commented 2 years ago

This is great to hear! Feel free to join the #software-dev channel on our Discord server if you have any questions or issues with plugin development.