Vilerala
Vilerala

Reputation: 73

Python Problem - PDAL does not install "ERROR: Failed building wheel for PDAL Failed to build PDAL"

I get this error when trying to install PDAL python package and don't know what to do. Thankful for any help!

MacOS

Python 3.9.14

Pip 23.2.1

Building wheels for collected packages: PDAL Building wheel for PDAL (pyproject.toml) ... error error: subprocess-exited-with-error

× Building wheel for PDAL (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [98 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 (3.6s)
  -- Generating done (0.0s)
  -- Build files have been written to: /private/var/folders/0h/0ncvw0p13k9g0x96c9qgwv4h0000gn/T/pip-install-1lw1m4wz/pdal_350573023435469494b1c03aeff58c0a/_cmake_test_compile/build
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying 'Ninja' generator - success
  --------------------------------------------------------------------------------
  
  Configuring Project
    Working directory:
      /private/var/folders/0h/0ncvw0p13k9g0x96c9qgwv4h0000gn/T/pip-install-1lw1m4wz/pdal_350573023435469494b1c03aeff58c0a/_skbuild/macosx-13.0-arm64-3.9/cmake-build
    Command:
      /private/var/folders/0h/0ncvw0p13k9g0x96c9qgwv4h0000gn/T/pip-build-env-q9k4g3ai/overlay/lib/python3.9/site-packages/cmake/data/bin/cmake /private/var/folders/0h/0ncvw0p13k9g0x96c9qgwv4h0000gn/T/pip-install-1lw1m4wz/pdal_350573023435469494b1c03aeff58c0a -G Ninja -DCMAKE_MAKE_PROGRAM:FILEPATH=/private/var/folders/0h/0ncvw0p13k9g0x96c9qgwv4h0000gn/T/pip-build-env-q9k4g3ai/overlay/lib/python3.9/site-packages/ninja/data/bin/ninja --no-warn-unused-cli -DCMAKE_INSTALL_PREFIX:PATH=/private/var/folders/0h/0ncvw0p13k9g0x96c9qgwv4h0000gn/T/pip-install-1lw1m4wz/pdal_350573023435469494b1c03aeff58c0a/_skbuild/macosx-13.0-arm64-3.9/cmake-install -DPYTHON_VERSION_STRING:STRING=3.9.17 -DSKBUILD:INTERNAL=TRUE -DCMAKE_MODULE_PATH:PATH=/private/var/folders/0h/0ncvw0p13k9g0x96c9qgwv4h0000gn/T/pip-build-env-q9k4g3ai/overlay/lib/python3.9/site-packages/skbuild/resources/cmake -DPYTHON_EXECUTABLE:PATH=/Users/XY/anaconda3/envs/tsa/bin/python -DPYTHON_INCLUDE_DIR:PATH=/Users/milenalang/anaconda3/envs/tsa/include/python3.9 -DPYTHON_LIBRARY:PATH=/Users/XY/anaconda3/envs/tsa/lib/libpython3.9.dylib -DPython_EXECUTABLE:PATH=/Users/XY/anaconda3/envs/tsa/bin/python -DPython_ROOT_DIR:PATH=/Users/XY/DPython_INCLUDE_DIR:PATH=/Users/milenalang/anaconda3/envs/tsa/include/python3.9 -DPython_NumPy_INCLUDE_DIRS:PATH=/private/var/folders/0h/0ncvw0p13k9g0x96c9qgwv4h0000gn/T/pip-build-env-q9k4g3ai/overlay/lib/python3.9/site-packages/numpy/core/include -DPython3_EXECUTABLE:PATH=/Users/XY/anaconda3/envs/tsa/bin/python -DPython3_ROOT_DIR:PATH=/Users/XY/anaconda3/envs/tsa -DPython3_FIND_REGISTRY:STRING=NEVER -DPython3_INCLUDE_DIR:PATH=/Users/XY/anaconda3/envs/tsa/include/python3.9 -DPython3_NumPy_INCLUDE_DIRS:PATH=/private/var/folders/0h/0ncvw0p13k9g0x96c9qgwv4h0000gn/T/pip-build-env-q9k4g3ai/overlay/lib/python3.9/site-packages/numpy/core/include -DCMAKE_MAKE_PROGRAM:FILEPATH=/private/var/folders/0h/0ncvw0p13k9g0x96c9qgwv4h0000gn/T/pip-build-env-q9k4g3ai/overlay/lib/python3.9/site-packages/ninja/data/bin/ninja -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
  -- The CXX 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
  -- 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
  -- Found Python3: /Users/XY/anaconda3/envs/tsa/bin/python (found version "3.9.17") found components: Interpreter Development NumPy Development.Module Development.Embed
  CMake Error at CMakeLists.txt:26 (find_package):
    By not providing "FindPDAL.cmake" in CMAKE_MODULE_PATH this project has
    asked CMake to find a package configuration file provided by "PDAL", but
    CMake did not find one.
  
    Could not find a package configuration file provided by "PDAL" (requested
    version 2.4) with any of the following names:
  
      PDALConfig.cmake
      pdal-config.cmake
  
    Add the installation prefix of "PDAL" to CMAKE_PREFIX_PATH or set
    "PDAL_DIR" to a directory containing one of the above files.  If "PDAL"
    provides a separate development package or SDK, be sure it has been
    installed.
  
  
  -- Configuring incomplete, errors occurred!
  Traceback (most recent call last):
    File "/private/var/folders/0h/0ncvw0p13k9g0x96c9qgwv4h0000gn/T/pip-build-env-q9k4g3ai/overlay/lib/python3.9/site-packages/skbuild/setuptools_wrap.py", line 666, in setup
      env = cmkr.configure(
    File "/private/var/folders/0h/0ncvw0p13k9g0x96c9qgwv4h0000gn/T/pip-build-env-q9k4g3ai/overlay/lib/python3.9/site-packages/skbuild/cmaker.py", line 357, in configure
      raise SKBuildError(msg)
  
  An error occurred while configuring with CMake.
    Command:
      /private/var/folders/0h/0ncvw0p13k9g0x96c9qgwv4h0000gn/T/pip-build-env-q9k4g3ai/overlay/lib/python3.9/site-packages/cmake/data/bin/cmake /private/var/folders/0h/0ncvw0p13k9g0x96c9qgwv4h0000gn/T/pip-install-1lw1m4wz/pdal_350573023435469494b1c03aeff58c0a -G Ninja -DCMAKE_MAKE_PROGRAM:FILEPATH=/private/var/folders/0h/0ncvw0p13k9g0x96c9qgwv4h0000gn/T/pip-build-env-q9k4g3ai/overlay/lib/python3.9/site-packages/ninja/data/bin/ninja --no-warn-unused-cli -DCMAKE_INSTALL_PREFIX:PATH=/private/var/folders/0h/0ncvw0p13k9g0x96c9qgwv4h0000gn/T/pip-install-1lw1m4wz/pdal_350573023435469494b1c03aeff58c0a/_skbuild/macosx-13.0-arm64-3.9/cmake-install -DPYTHON_VERSION_STRING:STRING=3.9.17 -DSKBUILD:INTERNAL=TRUE -DCMAKE_MODULE_PATH:PATH=/private/var/folders/0h/0ncvw0p13k9g0x96c9qgwv4h0000gn/T/pip-build-env-q9k4g3ai/overlay/lib/python3.9/site-packages/skbuild/resources/cmake -DPYTHON_EXECUTABLE:PATH=/Users/XY/anaconda3/envs/tsa/bin/python -DPYTHON_INCLUDE_DIR:PATH=/Users/XY/anaconda3/envs/tsa/include/python3.9 -DPYTHON_LIBRARY:PATH=/Users/XY/anaconda3/envs/tsa/lib/libpython3.9.dylib -DPython_EXECUTABLE:PATH=/Users/XY/anaconda3/envs/tsa/bin/python -DPython_ROOT_DIR:PATH=/Users/XY/anaconda3/envs/tsa -DPython_FIND_REGISTRY:STRING=NEVER -DPython_INCLUDE_DIR:PATH=/Users/XY/anaconda3/envs/tsa/include/python3.9 -DPython_NumPy_INCLUDE_DIRS:PATH=/private/var/folders/0h/0ncvw0p13k9g0x96c9qgwv4h0000gn/T/pip-build-env-q9k4g3ai/overlay/lib/python3.9/site-packages/numpy/core/include -DPython3_EXECUTABLE:PATH=/Users/XY/anaconda3/envs/tsa/bin/python -DPython3_ROOT_DIR:PATH=/Users/XY/anaconda3/envs/tsa -DPython3_FIND_REGISTRY:STRING=NEVER -DPython3_INCLUDE_DIR:PATH=/Users/XY/anaconda3/envs/tsa/include/python3.9 -DPython3_NumPy_INCLUDE_DIRS:PATH=/private/var/folders/0h/0ncvw0p13k9g0x96c9qgwv4h0000gn/T/pip-build-env-q9k4g3ai/overlay/lib/python3.9/site-packages/numpy/core/include -DCMAKE_MAKE_PROGRAM:FILEPATH=/private/var/folders/0h/0ncvw0p13k9g0x96c9qgwv4h0000gn/T/pip-build-env-q9k4g3ai/overlay/lib/python3.9/site-packages/ninja/data/bin/ninja -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=13.0 -DCMAKE_OSX_ARCHITECTURES:STRING=arm64 -DCMAKE_BUILD_TYPE:STRING=Release
    Source directory:
      /private/var/folders/0h/0ncvw0p13k9g0x96c9qgwv4h0000gn/T/pip-install-1lw1m4wz/pdal_350573023435469494b1c03aeff58c0a
    Working directory:
      /private/var/folders/0h/0ncvw0p13k9g0x96c9qgwv4h0000gn/T/pip-install-1lw1m4wz/pdal_350573023435469494b1c03aeff58c0a/_skbuild/macosx-13.0-arm64-3.9/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 PDAL Failed to build PDAL ERROR: Could not build wheels for PDAL, which is required to install pyproject.toml-based projects

Upvotes: 2

Views: 568

Answers (1)

marting
marting

Reputation: 409

Yo, this post is a bit oldy oldy but anyway, I think the issue is to do with the pdal library not being installed. Before trying to install PDAL, you should have the libpdal-dev library installed.

You may check this by running the command pdal-config

Upvotes: 0

Related Questions