PDAL / python

PDAL's Python Support
Other
116 stars 34 forks source link

ImportError: libpdal_base.so.13: cannot open shared object file: No such file or directory #111

Closed malvinadupays closed 2 years ago

malvinadupays commented 2 years ago

Yi,

I have a problem when I install PDAL and PDAL Python with docker

ARG DISTRIB=ubuntu
ARG VERSION=latest
FROM ${DISTRIB}:${VERSION}

LABEL maintainer="m.dupays@upfactor.fr"

RUN mkdir -p /usr/src/2_Detect_Ground
ENV HOME /usr/src/2_Detect_Ground

ENV TZ=Europe/Paris
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN apt-get update -q && \
    apt-get install -q -y build-essential
RUN apt-get install -y python g++ make cmake wget git
RUN apt-get update -qq
RUN apt-get install -y -q  cmake \
                           libgdal-dev \
                           libpq-dev \
                           python-all-dev \
                           python3-pip \ 
                           python-setuptools \
                           python-numpy \
                           libproj-dev \
                           libxml2-dev \
                           libboost-all-dev \
                           libbz2-dev \
                           libsqlite0-dev \
                           cmake-curses-gui \
                           screen \
                           postgis \
                           libcunit1-dev \
                           libmsgpack-dev \
                           vim \
                           libeigen3-dev \
                           libflann-dev \
                           libglew-dev \
                           libhdf5-serial-dev \
                           libvtk6-dev \
                           gcc-multilib \
                           g++-multilib \
                           libglew-dev \
                           maven

COPY . $HOME
RUN cd $HOME && mkdir data _tmp outpubuffer DTM
# # Install python envrionnement
RUN pip install --no-cache-dir --upgrade -r $HOME/requirement.txt

# # Install LASZip
WORKDIR /opt
RUN cd /opt && git clone https://github.com/LASzip/LASzip.git laszip && \
    cd laszip && \
    cmake . && make && \
    make install

# # Install libgeotiff requirement for PDAL
RUN cd /opt && wget http://download.osgeo.org/geotiff/libgeotiff/libgeotiff-1.7.0.tar.gz && \
    tar -xzf libgeotiff-1.7.0.tar.gz && \
    cd libgeotiff-1.7.0 && \
    ./configure --prefix=/usr && make && make install

# # Install PDAL
RUN cd /opt && git clone https://github.com/PDAL/PDAL.git pdal && \
    mkdir -p pdal/build && \
    cd pdal/build  && \
    cmake .. && \
    make && \
    make install
RUN pip install PDAL

WORKDIR $HOME

CMD tail -f /dev/null

When I lauch docker run bash -c "python ...", I have this message error :

File "/usr/local/lib/python3.8/dist-packages/pdal/init.py", line 4, in from . import libpdalpython ImportError: libpdal_base.so.13: cannot open shared object file: No such file or directory

hobu commented 2 years ago

install python-pdal into a fresh environment.

conda create -n pdal-python -c conda-forge python-pdal

There is a dependency pin that needs to be made for the PDAL Python bindings it seems, as this isn't the only complaint of this issue. That ticket should be made at https://github.com/hobu/python-pdal-feedstock/