Skip to content

pip install PDAL fails using docker #150

@eikeschott

Description

@eikeschott

I'm trying to install pdal in the official python docker container using pip but keep running into the same Error.
Here is my Dockerfile:

FROM python:3

WORKDIR /usr/src/app

RUN apt-get update
RUN apt-get -y install pdal libpdal-dev

RUN pip install PDAL

CMD [ "/bin/bash" ]

The Error I'm seeing seems to be similar to the one in #66 but I can't find a solution.

> [5/6] RUN pip install PDAL:                                                                                                                                                        
2.174 Collecting PDAL                                                                                                                                                                 
2.224   Downloading pdal-3.2.3.tar.gz (246 kB)                                                                                                                                        
2.291      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 246.7/246.7 kB 3.9 MB/s eta 0:00:00                                                                                                
2.328   Installing build dependencies: started                                                                                                                                        
14.12   Installing build dependencies: finished with status 'done'
14.13   Getting requirements to build wheel: started
14.34   Getting requirements to build wheel: finished with status 'done'
14.35   Preparing metadata (pyproject.toml): started
14.50   Preparing metadata (pyproject.toml): finished with status 'done'
14.76 Collecting numpy
14.77   Using cached numpy-1.25.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.2 MB)
14.81 Building wheels for collected packages: PDAL
14.82   Building wheel for PDAL (pyproject.toml): started
15.78   Building wheel for PDAL (pyproject.toml): finished with status 'error'
15.79   error: subprocess-exited-with-error
15.79   
15.79   × Building wheel for PDAL (pyproject.toml) did not run successfully.
15.79   │ exit code: 1
15.79   ╰─> [92 lines of output]
15.79       
15.79       
15.79       --------------------------------------------------------------------------------
15.79       -- Trying 'Ninja' generator
15.79       --------------------------------
15.79       ---------------------------
15.79       ----------------------
15.79       -----------------
15.79       ------------
15.79       -------
15.79       --
15.79       CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
15.79         Compatibility with CMake < 3.5 will be removed from a future version of
15.79         CMake.
15.79       
15.79         Update the VERSION argument <min> value or use a ...<max> suffix to tell
15.79         CMake that the project does not need compatibility with older versions.
15.79       
15.79       Not searching for unused variables given on the command line.
15.79       
15.79       -- The C compiler identification is GNU 10.2.1
15.79       -- Detecting C compiler ABI info
15.79       -- Detecting C compiler ABI info - done
15.79       -- Check for working C compiler: /usr/bin/cc - skipped
15.79       -- Detecting C compile features
15.79       -- Detecting C compile features - done
15.79       -- The CXX compiler identification is GNU 10.2.1
15.79       -- Detecting CXX compiler ABI info
15.79       -- Detecting CXX compiler ABI info - done
15.79       -- Check for working CXX compiler: /usr/bin/c++ - skipped
15.79       -- Detecting CXX compile features
15.79       -- Detecting CXX compile features - done
15.79       -- Configuring done (0.3s)
15.79       -- Generating done (0.0s)
15.79       -- Build files have been written to: /tmp/pip-install-igzln77m/pdal_915331ee26c844978473f2763e4d7141/_cmake_test_compile/build
15.79       --
15.79       -------
15.79       ------------
15.79       -----------------
15.79       ----------------------
15.79       ---------------------------
15.79       --------------------------------
15.79       -- Trying 'Ninja' generator - success
15.79       --------------------------------------------------------------------------------
15.79       
15.79       Configuring Project
15.79         Working directory:
15.79           /tmp/pip-install-igzln77m/pdal_915331ee26c844978473f2763e4d7141/_skbuild/linux-x86_64-3.11/cmake-build
15.79         Command:
15.79           /tmp/pip-build-env-m773tijp/overlay/lib/python3.11/site-packages/cmake/data/bin/cmake /tmp/pip-install-igzln77m/pdal_915331ee26c844978473f2763e4d7141 -G Ninja -DCMAKE_MAKE_PROGRAM:FILEPATH=/tmp/pip-build-env-m773tijp/overlay/lib/python3.11/site-packages/ninja/data/bin/ninja --no-warn-unused-cli -DCMAKE_INSTALL_PREFIX:PATH=/tmp/pip-install-igzln77m/pdal_915331ee26c844978473f2763e4d7141/_skbuild/linux-x86_64-3.11/cmake-install -DPYTHON_VERSION_STRING:STRING=3.11.2 -DSKBUILD:INTERNAL=TRUE -DCMAKE_MODULE_PATH:PATH=/tmp/pip-build-env-m773tijp/overlay/lib/python3.11/site-packages/skbuild/resources/cmake -DPYTHON_EXECUTABLE:PATH=/usr/local/bin/python -DPYTHON_INCLUDE_DIR:PATH=/usr/local/include/python3.11 -DPYTHON_LIBRARY:PATH=/usr/local/lib/libpython3.11.so -DPython_EXECUTABLE:PATH=/usr/local/bin/python -DPython_ROOT_DIR:PATH=/usr/local -DPython_FIND_REGISTRY:STRING=NEVER -DPython_INCLUDE_DIR:PATH=/usr/local/include/python3.11 -DPython_NumPy_INCLUDE_DIRS:PATH=/tmp/pip-build-env-m773tijp/overlay/lib/python3.11/site-packages/numpy/core/include -DPython3_EXECUTABLE:PATH=/usr/local/bin/python -DPython3_ROOT_DIR:PATH=/usr/local -DPython3_FIND_REGISTRY:STRING=NEVER -DPython3_INCLUDE_DIR:PATH=/usr/local/include/python3.11 -DPython3_NumPy_INCLUDE_DIRS:PATH=/tmp/pip-build-env-m773tijp/overlay/lib/python3.11/site-packages/numpy/core/include -DCMAKE_MAKE_PROGRAM:FILEPATH=/tmp/pip-build-env-m773tijp/overlay/lib/python3.11/site-packages/ninja/data/bin/ninja -DCMAKE_BUILD_TYPE:STRING=Release
15.79       
15.79       Not searching for unused variables given on the command line.
15.79       -- The C compiler identification is GNU 10.2.1
15.79       -- The CXX compiler identification is GNU 10.2.1
15.79       -- Detecting C compiler ABI info
15.79       -- Detecting C compiler ABI info - done
15.79       -- Check for working C compiler: /usr/bin/cc - skipped
15.79       -- Detecting C compile features
15.79       -- Detecting C compile features - done
15.79       -- Detecting CXX compiler ABI info
15.79       -- Detecting CXX compiler ABI info - done
15.79       -- Check for working CXX compiler: /usr/bin/c++ - skipped
15.79       -- Detecting CXX compile features
15.79       -- Detecting CXX compile features - done
15.79       -- Found Python3: /usr/local/bin/python (found version "3.11.2") found components: Interpreter Development.Module NumPy
15.79       CMake Error at CMakeLists.txt:26 (find_package):
15.79         Could not find a configuration file for package "PDAL" that is compatible
15.79         with requested version "2.4".
15.79       
15.79         The following configuration files were considered but not accepted:
15.79       
15.79           /usr/lib/cmake/PDAL/PDALConfig.cmake, version: 2.2.0
15.79       
15.79       
15.79       
15.79       -- Configuring incomplete, errors occurred!
15.79       Traceback (most recent call last):
15.79         File "/tmp/pip-build-env-m773tijp/overlay/lib/python3.11/site-packages/skbuild/setuptools_wrap.py", line 666, in setup
15.79           env = cmkr.configure(
15.79                 ^^^^^^^^^^^^^^^
15.79         File "/tmp/pip-build-env-m773tijp/overlay/lib/python3.11/site-packages/skbuild/cmaker.py", line 357, in configure
15.79           raise SKBuildError(msg)
15.79       
15.79       An error occurred while configuring with CMake.
15.79         Command:
15.79           /tmp/pip-build-env-m773tijp/overlay/lib/python3.11/site-packages/cmake/data/bin/cmake /tmp/pip-install-igzln77m/pdal_915331ee26c844978473f2763e4d7141 -G Ninja -DCMAKE_MAKE_PROGRAM:FILEPATH=/tmp/pip-build-env-m773tijp/overlay/lib/python3.11/site-packages/ninja/data/bin/ninja --no-warn-unused-cli -DCMAKE_INSTALL_PREFIX:PATH=/tmp/pip-install-igzln77m/pdal_915331ee26c844978473f2763e4d7141/_skbuild/linux-x86_64-3.11/cmake-install -DPYTHON_VERSION_STRING:STRING=3.11.2 -DSKBUILD:INTERNAL=TRUE -DCMAKE_MODULE_PATH:PATH=/tmp/pip-build-env-m773tijp/overlay/lib/python3.11/site-packages/skbuild/resources/cmake -DPYTHON_EXECUTABLE:PATH=/usr/local/bin/python -DPYTHON_INCLUDE_DIR:PATH=/usr/local/include/python3.11 -DPYTHON_LIBRARY:PATH=/usr/local/lib/libpython3.11.so -DPython_EXECUTABLE:PATH=/usr/local/bin/python -DPython_ROOT_DIR:PATH=/usr/local -DPython_FIND_REGISTRY:STRING=NEVER -DPython_INCLUDE_DIR:PATH=/usr/local/include/python3.11 -DPython_NumPy_INCLUDE_DIRS:PATH=/tmp/pip-build-env-m773tijp/overlay/lib/python3.11/site-packages/numpy/core/include -DPython3_EXECUTABLE:PATH=/usr/local/bin/python -DPython3_ROOT_DIR:PATH=/usr/local -DPython3_FIND_REGISTRY:STRING=NEVER -DPython3_INCLUDE_DIR:PATH=/usr/local/include/python3.11 -DPython3_NumPy_INCLUDE_DIRS:PATH=/tmp/pip-build-env-m773tijp/overlay/lib/python3.11/site-packages/numpy/core/include -DCMAKE_MAKE_PROGRAM:FILEPATH=/tmp/pip-build-env-m773tijp/overlay/lib/python3.11/site-packages/ninja/data/bin/ninja -DCMAKE_BUILD_TYPE:STRING=Release
15.79         Source directory:
15.79           /tmp/pip-install-igzln77m/pdal_915331ee26c844978473f2763e4d7141
15.79         Working directory:
15.79           /tmp/pip-install-igzln77m/pdal_915331ee26c844978473f2763e4d7141/_skbuild/linux-x86_64-3.11/cmake-build
15.79       Please see CMake's output for more information.
15.79       
15.79       [end of output]
15.79   
15.79   note: This error originates from a subprocess, and is likely not a problem with pip.
15.79   ERROR: Failed building wheel for PDAL
15.79 Failed to build PDAL
15.79 ERROR: Could not build wheels for PDAL, which is required to install pyproject.toml-based projects
15.80 
15.80 [notice] A new release of pip available: 22.3.1 -> 23.2.1
15.80 [notice] To update, run: pip install --upgrade pip

If I stop the build process after apt-get -y pdal libpdal-dev and look into the container I get the following:

root@73c79d8b7618:/usr/src/app# pdal --version
----------------------------------------------------------
pdal 2.2.0 (git-version: Release)
----------------------------------------------------------
root@73c79d8b7618:/usr/src/app# pdal-config --libs
-L/usr/lib -lpdalcpp
root@73c79d8b7618:/usr/src/app# ls /usr/lib/cmake/PDAL
PDALConfig.cmake  PDALConfigVersion.cmake  PDALTargets-relwithdebinfo.cmake  PDALTargets.cmake

The error message states explicitly the cmake file at /usr/lib/cmake/PDAL/ was considered but not accepted. Any ideas on how to get PDAL installed using pip in this case?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions