Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error installation for Mac M1 Silicon #98

Open
HugoML opened this issue Mar 4, 2024 · 3 comments
Open

Error installation for Mac M1 Silicon #98

HugoML opened this issue Mar 4, 2024 · 3 comments

Comments

@HugoML
Copy link

HugoML commented Mar 4, 2024

Platform: Mac M1 Silicon
$brew install libuvc
$brew install jpeg-turbo
All ok.

$pip3 install pupil-labs-uvc
Collecting pupil-labs-uvc
Using cached pupil_labs_uvc-1.0.0b7.tar.gz (91 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: numpy in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from pupil-labs-uvc) (1.26.4)
Building wheels for collected packages: pupil-labs-uvc
Building wheel for pupil-labs-uvc (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for pupil-labs-uvc (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [142 lines of output]

  --------------------------------------------------------------------------------
  -- Trying 'Ninja' generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
    Compatibility with CMake < 3.5 will be removed from a future version of
    CMake.
  
    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.
  
  Not searching for unused variables given on the command line.
  
  -- The C compiler identification is AppleClang 14.0.3.14030022
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- The CXX compiler identification is AppleClang 14.0.3.14030022
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Configuring done (0.6s)
  -- Generating done (0.0s)
  -- Build files have been written to: /private/var/folders/wf/_xg5thfs7vz_fgxjsz3jzv700000gn/T/pip-install-p519pr5n/pupil-labs-uvc_92ed8a55adf04b0eb54feecdc355b435/_cmake_test_compile/build
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying 'Ninja' generator - success
  --------------------------------------------------------------------------------
  
  Configuring Project
    Working directory:
      /private/var/folders/wf/_xg5thfs7vz_fgxjsz3jzv700000gn/T/pip-install-p519pr5n/pupil-labs-uvc_92ed8a55adf04b0eb54feecdc355b435/_skbuild/macosx-13.0-arm64-3.11/cmake-build
    Command:
      /private/var/folders/wf/_xg5thfs7vz_fgxjsz3jzv700000gn/T/pip-build-env-vjhntal5/overlay/lib/python3.11/site-packages/cmake/data/bin/cmake /private/var/folders/wf/_xg5thfs7vz_fgxjsz3jzv700000gn/T/pip-install-p519pr5n/pupil-labs-uvc_92ed8a55adf04b0eb54feecdc355b435/pyuvc-source -G Ninja -DCMAKE_MAKE_PROGRAM:FILEPATH=/private/var/folders/wf/_xg5thfs7vz_fgxjsz3jzv700000gn/T/pip-build-env-vjhntal5/overlay/lib/python3.11/site-packages/ninja/data/bin/ninja --no-warn-unused-cli -DCMAKE_INSTALL_PREFIX:PATH=/private/var/folders/wf/_xg5thfs7vz_fgxjsz3jzv700000gn/T/pip-install-p519pr5n/pupil-labs-uvc_92ed8a55adf04b0eb54feecdc355b435/_skbuild/macosx-13.0-arm64-3.11/cmake-install/pyuvc-source/uvc -DPYTHON_VERSION_STRING:STRING=3.11.8 -DSKBUILD:INTERNAL=TRUE -DCMAKE_MODULE_PATH:PATH=/private/var/folders/wf/_xg5thfs7vz_fgxjsz3jzv700000gn/T/pip-build-env-vjhntal5/overlay/lib/python3.11/site-packages/skbuild/resources/cmake -DPYTHON_EXECUTABLE:PATH=/Library/Frameworks/Python.framework/Versions/3.11/bin/python3.11 -DPYTHON_INCLUDE_DIR:PATH=/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -DPYTHON_LIBRARY:PATH=/Library/Frameworks/Python.framework/Versions/3.11/lib/libpython3.11.dylib -DPython_EXECUTABLE:PATH=/Library/Frameworks/Python.framework/Versions/3.11/bin/python3.11 -DPython_ROOT_DIR:PATH=/Library/Frameworks/Python.framework/Versions/3.11 -DPython_FIND_REGISTRY:STRING=NEVER -DPython_INCLUDE_DIR:PATH=/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -DPython_NumPy_INCLUDE_DIRS:PATH=/private/var/folders/wf/_xg5thfs7vz_fgxjsz3jzv700000gn/T/pip-build-env-vjhntal5/overlay/lib/python3.11/site-packages/numpy/core/include -DPython3_EXECUTABLE:PATH=/Library/Frameworks/Python.framework/Versions/3.11/bin/python3.11 -DPython3_ROOT_DIR:PATH=/Library/Frameworks/Python.framework/Versions/3.11 -DPython3_FIND_REGISTRY:STRING=NEVER -DPython3_INCLUDE_DIR:PATH=/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -DPython3_NumPy_INCLUDE_DIRS:PATH=/private/var/folders/wf/_xg5thfs7vz_fgxjsz3jzv700000gn/T/pip-build-env-vjhntal5/overlay/lib/python3.11/site-packages/numpy/core/include -DCMAKE_MAKE_PROGRAM:FILEPATH=/private/var/folders/wf/_xg5thfs7vz_fgxjsz3jzv700000gn/T/pip-build-env-vjhntal5/overlay/lib/python3.11/site-packages/ninja/data/bin/ninja -DUVC_DEBUGGING=OFF -DFORCE_LOCAL_LIBUVC_BUILD=OFF -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=13.0 -DCMAKE_OSX_ARCHITECTURES:STRING=arm64 -DCMAKE_BUILD_TYPE:STRING=Release
  
  Not searching for unused variables given on the command line.
  -- The C compiler identification is AppleClang 14.0.3.14030022
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- FORCE_LOCAL_LIBUVC_BUILD=OFF
  -- Looking for libuvc...
  -- Found JPEG: /opt/homebrew/lib/libjpeg.dylib (found version "80")
  -- Found JPEG library using standard module
  CMake Warning (dev) at /private/var/folders/wf/_xg5thfs7vz_fgxjsz3jzv700000gn/T/pip-build-env-vjhntal5/overlay/lib/python3.11/site-packages/cmake/data/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
    The package name passed to `find_package_handle_standard_args` (JPEG) does
    not match the name of the calling package (JpegPkg).  This can lead to
    problems in calling code that expects `find_package` result variables
    (e.g., `_FOUND`) to follow a certain pattern.
  Call Stack (most recent call first):
    /opt/homebrew/lib/cmake/libuvc/FindJpegPkg.cmake:58 (find_package_handle_standard_args)
    /opt/homebrew/lib/cmake/libuvc/libuvcConfig.cmake:13 (find_package)
    CMakeLists.txt:14 (find_package)
  This warning is for project developers.  Use -Wno-dev to suppress it.
  
  -- Found JPEG: /opt/homebrew/lib/libjpeg.dylib
  -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
  CMake Error at /private/var/folders/wf/_xg5thfs7vz_fgxjsz3jzv700000gn/T/pip-build-env-vjhntal5/overlay/lib/python3.11/site-packages/cmake/data/share/cmake-3.28/Modules/FindPkgConfig.cmake:675 (message):
    pkg-config tool not found
  Call Stack (most recent call first):
    /private/var/folders/wf/_xg5thfs7vz_fgxjsz3jzv700000gn/T/pip-build-env-vjhntal5/overlay/lib/python3.11/site-packages/cmake/data/share/cmake-3.28/Modules/FindPkgConfig.cmake:841 (_pkg_check_modules_internal)
    /opt/homebrew/lib/cmake/libuvc/FindLibUSB.cmake:18 (pkg_check_modules)
    /opt/homebrew/lib/cmake/libuvc/libuvcConfig.cmake:14 (find_package)
    CMakeLists.txt:14 (find_package)
  
  
  -- Setting RPATH to
  CMake Warning (dev) at /private/var/folders/wf/_xg5thfs7vz_fgxjsz3jzv700000gn/T/pip-build-env-vjhntal5/overlay/lib/python3.11/site-packages/skbuild/resources/cmake/FindPythonExtensions.cmake:245 (find_package):
    Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
    are removed.  Run "cmake --help-policy CMP0148" for policy details.  Use
    the cmake_policy command to set the policy and suppress this warning.
  
  Call Stack (most recent call first):
    CMakeLists.txt:38 (find_package)
  This warning is for project developers.  Use -Wno-dev to suppress it.
  
  -- Found PythonInterp: /Library/Frameworks/Python.framework/Versions/3.11/bin/python3.11 (found version "3.11.8")
  CMake Warning (dev) at /private/var/folders/wf/_xg5thfs7vz_fgxjsz3jzv700000gn/T/pip-build-env-vjhntal5/overlay/lib/python3.11/site-packages/skbuild/resources/cmake/FindPythonExtensions.cmake:252 (find_package):
    Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
    are removed.  Run "cmake --help-policy CMP0148" for policy details.  Use
    the cmake_policy command to set the policy and suppress this warning.
  
  Call Stack (most recent call first):
    CMakeLists.txt:38 (find_package)
  This warning is for project developers.  Use -Wno-dev to suppress it.
  
  -- Found PythonLibs: /Library/Frameworks/Python.framework/Versions/3.11/lib/libpython3.11.dylib (found version "3.11.8")
  -- Found Cython: /private/var/folders/wf/_xg5thfs7vz_fgxjsz3jzv700000gn/T/pip-build-env-vjhntal5/overlay/bin/cython
  -- Found NumPy: /private/var/folders/wf/_xg5thfs7vz_fgxjsz3jzv700000gn/T/pip-build-env-vjhntal5/overlay/lib/python3.11/site-packages/numpy/core/include (found version "1.26.4")
  -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
  CMake Error at /private/var/folders/wf/_xg5thfs7vz_fgxjsz3jzv700000gn/T/pip-build-env-vjhntal5/overlay/lib/python3.11/site-packages/cmake/data/share/cmake-3.28/Modules/FindPkgConfig.cmake:675 (message):
    pkg-config tool not found
  Call Stack (most recent call first):
    /private/var/folders/wf/_xg5thfs7vz_fgxjsz3jzv700000gn/T/pip-build-env-vjhntal5/overlay/lib/python3.11/site-packages/cmake/data/share/cmake-3.28/Modules/FindPkgConfig.cmake:841 (_pkg_check_modules_internal)
    CMakeLists.txt:46 (pkg_check_modules)
  
  
  CMake Error at /private/var/folders/wf/_xg5thfs7vz_fgxjsz3jzv700000gn/T/pip-build-env-vjhntal5/overlay/lib/python3.11/site-packages/cmake/data/share/cmake-3.28/Modules/FindPkgConfig.cmake:675 (message):
    pkg-config tool not found
  Call Stack (most recent call first):
    /private/var/folders/wf/_xg5thfs7vz_fgxjsz3jzv700000gn/T/pip-build-env-vjhntal5/overlay/lib/python3.11/site-packages/cmake/data/share/cmake-3.28/Modules/FindPkgConfig.cmake:841 (_pkg_check_modules_internal)
    CMakeLists.txt:47 (pkg_check_modules)
  
  
  -- Performing Test Weak Link MODULE -> SHARED (gnu_ld_ignore) - Failed
  -- Performing Test Weak Link MODULE -> SHARED (osx_dynamic_lookup) - Success
  _modinit_prefix:PyInit_
  -- Configuring incomplete, errors occurred!
  Traceback (most recent call last):
    File "/private/var/folders/wf/_xg5thfs7vz_fgxjsz3jzv700000gn/T/pip-build-env-vjhntal5/overlay/lib/python3.11/site-packages/skbuild/setuptools_wrap.py", line 666, in setup
      env = cmkr.configure(
            ^^^^^^^^^^^^^^^
    File "/private/var/folders/wf/_xg5thfs7vz_fgxjsz3jzv700000gn/T/pip-build-env-vjhntal5/overlay/lib/python3.11/site-packages/skbuild/cmaker.py", line 357, in configure
      raise SKBuildError(msg)
  
  An error occurred while configuring with CMake.
    Command:
      /private/var/folders/wf/_xg5thfs7vz_fgxjsz3jzv700000gn/T/pip-build-env-vjhntal5/overlay/lib/python3.11/site-packages/cmake/data/bin/cmake /private/var/folders/wf/_xg5thfs7vz_fgxjsz3jzv700000gn/T/pip-install-p519pr5n/pupil-labs-uvc_92ed8a55adf04b0eb54feecdc355b435/pyuvc-source -G Ninja -DCMAKE_MAKE_PROGRAM:FILEPATH=/private/var/folders/wf/_xg5thfs7vz_fgxjsz3jzv700000gn/T/pip-build-env-vjhntal5/overlay/lib/python3.11/site-packages/ninja/data/bin/ninja --no-warn-unused-cli -DCMAKE_INSTALL_PREFIX:PATH=/private/var/folders/wf/_xg5thfs7vz_fgxjsz3jzv700000gn/T/pip-install-p519pr5n/pupil-labs-uvc_92ed8a55adf04b0eb54feecdc355b435/_skbuild/macosx-13.0-arm64-3.11/cmake-install/pyuvc-source/uvc -DPYTHON_VERSION_STRING:STRING=3.11.8 -DSKBUILD:INTERNAL=TRUE -DCMAKE_MODULE_PATH:PATH=/private/var/folders/wf/_xg5thfs7vz_fgxjsz3jzv700000gn/T/pip-build-env-vjhntal5/overlay/lib/python3.11/site-packages/skbuild/resources/cmake -DPYTHON_EXECUTABLE:PATH=/Library/Frameworks/Python.framework/Versions/3.11/bin/python3.11 -DPYTHON_INCLUDE_DIR:PATH=/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -DPYTHON_LIBRARY:PATH=/Library/Frameworks/Python.framework/Versions/3.11/lib/libpython3.11.dylib -DPython_EXECUTABLE:PATH=/Library/Frameworks/Python.framework/Versions/3.11/bin/python3.11 -DPython_ROOT_DIR:PATH=/Library/Frameworks/Python.framework/Versions/3.11 -DPython_FIND_REGISTRY:STRING=NEVER -DPython_INCLUDE_DIR:PATH=/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -DPython_NumPy_INCLUDE_DIRS:PATH=/private/var/folders/wf/_xg5thfs7vz_fgxjsz3jzv700000gn/T/pip-build-env-vjhntal5/overlay/lib/python3.11/site-packages/numpy/core/include -DPython3_EXECUTABLE:PATH=/Library/Frameworks/Python.framework/Versions/3.11/bin/python3.11 -DPython3_ROOT_DIR:PATH=/Library/Frameworks/Python.framework/Versions/3.11 -DPython3_FIND_REGISTRY:STRING=NEVER -DPython3_INCLUDE_DIR:PATH=/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -DPython3_NumPy_INCLUDE_DIRS:PATH=/private/var/folders/wf/_xg5thfs7vz_fgxjsz3jzv700000gn/T/pip-build-env-vjhntal5/overlay/lib/python3.11/site-packages/numpy/core/include -DCMAKE_MAKE_PROGRAM:FILEPATH=/private/var/folders/wf/_xg5thfs7vz_fgxjsz3jzv700000gn/T/pip-build-env-vjhntal5/overlay/lib/python3.11/site-packages/ninja/data/bin/ninja -DUVC_DEBUGGING=OFF -DFORCE_LOCAL_LIBUVC_BUILD=OFF -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=13.0 -DCMAKE_OSX_ARCHITECTURES:STRING=arm64 -DCMAKE_BUILD_TYPE:STRING=Release
    Source directory:
      /private/var/folders/wf/_xg5thfs7vz_fgxjsz3jzv700000gn/T/pip-install-p519pr5n/pupil-labs-uvc_92ed8a55adf04b0eb54feecdc355b435/pyuvc-source
    Working directory:
      /private/var/folders/wf/_xg5thfs7vz_fgxjsz3jzv700000gn/T/pip-install-p519pr5n/pupil-labs-uvc_92ed8a55adf04b0eb54feecdc355b435/_skbuild/macosx-13.0-arm64-3.11/cmake-build
  Please see CMake's output for more information.
  
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pupil-labs-uvc
Failed to build pupil-labs-uvc
ERROR: Could not build wheels for pupil-labs-uvc, which is required to install pyproject.toml-based projects

@ericreg
Copy link

ericreg commented Mar 9, 2024

  CMake Error at /private/var/folders/wf/_xg5thfs7vz_fgxjsz3jzv700000gn/T/pip-build-env-vjhntal5/overlay/lib/python3.11/site-packages/cmake/data/share/cmake-3.28/Modules/FindPkgConfig.cmake:675 (message):
    pkg-config tool not found

Looks like your need to install pkgconfig.

@HugoML
Copy link
Author

HugoML commented Mar 13, 2024

Thanks @ericreg , appreciate!
After $brew install pkgconfig, the $pip3 install pupil-labs-uvc command yields:
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try brew install
xyz, where xyz is the package you are trying to
install.
$brew install pupil-labs-uvc
Warning: No available formula with the name "pupil-labs-uvc".
==> Searching for similarly named formulae and casks...
Error: No formulae or casks found for pupil-labs-uvc.
Going to try to install from the source.

@ericreg
Copy link

ericreg commented Mar 16, 2024

@HugoML I have the library working on an M1 mac with the following steps. You will also need to make a python virtual environment. If your not familiar with those I would recommend this tutorial

# install system dependencies
brew install libuvc pkgconfig jpeg-turbo

# install python build tools
pip install --upgrade pip setuptools wheel

# install pyuvc
FORCE_LOCAL_LIBUVC_BUILD=ON pip install pupil-labs-dvc

Do those work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants