PDAL / python

PDAL's Python Support
Other
117 stars 35 forks source link

Latest python-pdal conda build broken with pdal 2.2 & python3.8 #84

Closed kyri-petrou closed 3 years ago

kyri-petrou commented 3 years ago

The latest python-pdal Python3.8 build (py38h1fd1430_2) on conda-forge does not work with pdal 2.2. The code fails on import with the following traceback:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/jovyan/.conda/envs/my-env/lib/python3.8/site-packages/pdal/__init__.py", line 3, in <module>
    from .pipeline import Pipeline
  File "/home/jovyan/.conda/envs/my-env/lib/python3.8/site-packages/pdal/pipeline.py", line 2, in <module>
    from pdal import libpdalpython
ImportError: libpdal_base.so.13: cannot open shared object file: No such file or directory

Steps to reproduce:

conda create -n my-env -c conda-forge python=3.8 pdal=2.2 python-pdal=2.4 -y
conda activate pdal-test
python -c "import pdal"

NOTE: The above works fine with the previous build. E.g., the following works:

conda install -c conda-forge python=3.8 pdal=2.2 python-pdal=2.4=py38h1fd1430_1 -y
python -c "import pdal"
hobu commented 3 years ago

The pins are not set for python-pdal. It would be easiest to use pdal=2.3 or explicitly pin your python-pdal.

malvinadupays commented 2 years ago

Yi,

I have the same problem when I install PDAL with docker

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

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

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

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 folder "2_Detect_Ground"
WORKDIR $HOME
COPY 2_Detect_Ground.tar.gz $HOME
RUN tar zxvf 2_Detect_Ground.tar.gz
RUN cd $HOME/2_Detect_Ground && mkdir data _tmp outpubuffer DTM
COPY liste_municipality.csv $HOME/2_Detect_Ground
# # Install python envrionnement
RUN pip install --no-cache-dir --upgrade -r $HOME/2_Detect_Ground/requierement.txt

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

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

# # Install PDAL
WORKDIR /opt
RUN git clone https://github.com/PDAL/PDAL.git pdal
WORKDIR /opt/pdal
RUN mkdir build 
WORKDIR /opt/pdal/build
RUN cmake  ..
RUN make
RUN make install
RUN pip install PDAL==2.3.0

WORKDIR $HOME/2_Detect_Ground

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 <module>
    from . import libpdalpython
ImportError: libpdal_base.so.13: cannot open shared object file: No such file or directory

I test install pdal (2.2, 2.3), but it's not okay It's impossible to instal "python-pdal" ...

pip install python-pdal==2.4

This message

ERROR: Could not find a version that satisfies the requirement python-pdal==2.4 (from versions: none)
ERROR: No matching distribution found for python-pdal==2.4