conda-forge / pdal-feedstock

A conda-smithy repository for pdal.
BSD 3-Clause "New" or "Revised" License
3 stars 19 forks source link

filters.python plugin missing in PDAL 2.2.0 installed from conda-forge #131

Closed mz8i closed 2 years ago

mz8i commented 3 years ago

Issue: I installed pdal and python-pdal, but it seems that the python plugin is not present:

``` $ which pdal /home/user/.conda/envs/roofs/bin/pdal $ echo $PDAL_DRIVER_PATH /home/user/.conda/envs/roofs/lib:/home/user/.conda/envs/roofs/lib/python3.8/site-packages/lib:/home/user/.conda/envs/roofs/lib/python3.8/site-packages/lib64 $ pdal --drivers ============================ =============================================================================================================================================================================================================== Name Description ============================ =============================================================================================================================================================================================================== filters.approximatecoplanar Estimates the planarity of a neighborhood of points using eigenvalues. filters.assign Assign values for a dimension range to a specified value. filters.chipper Organize points into spatially contiguous, squarish, and non-overlapping chips. filters.cluster Extract and label clusters using Euclidean distance. filters.colorinterp Assigns RGB colors based on a dimension and a ramp filters.colorization Fetch and assign RGB color information from a GDAL-readable datasource. filters.covariancefeatures Filter that calculates local features based on the covariance matrix of a point's neighborhood. filters.crop Filter points inside or outside a bounding box or a polygon filters.csf Cloth Simulation Filter (Zhang et al., 2016) filters.dbscan DBSCAN Clustering. filters.decimation Rank decimation filter. Keep every Nth point filters.delaunay Perform Delaunay triangulation of a pointcloud filters.dem Filter points about an elevation surface filters.divider Divide points into approximately equal sized groups based on a simple scheme filters.eigenvalues Returns the eigenvalues for a given point, based on its k-nearest neighbors. filters.elm Marks low points as noise. filters.estimaterank Computes the rank of a neighborhood of points. filters.faceraster Face Raster Filter filters.ferry Copy data from one dimension to another. filters.fps Farthest point sampling filter filters.greedyprojection Greedy Triangulation filter filters.groupby Split data categorically by dimension. filters.hag_delaunay Computes height above ground using delaunay interpolation of ground returns. filters.hag_dem Computes height above ground using a DEM raster. filters.hag_nn Computes height above ground using nearest-neighbor ground-classified returns. filters.head Return N points from beginning of the point cloud. filters.hexbin Tessellate the point's X/Y domain and determine point density and/or point boundary. filters.icp Iterative Closest Point (ICP) registration. filters.info Gather basic info about points. filters.iqr Interquartile Range Filter filters.litree Li Tree Filter filters.lloydkmeans Extract and label clusters using K-means (Lloyd's algorithm). filters.locate Return a single point with min/max value in the named dimension. filters.lof LOF Filter filters.mad Median Absolute Deviation Filter filters.merge Merge data from two different readers into a single stream. filters.miniball Miniball (Kutz et al., 2003) filters.mongo Pass only points that pass a logic filter. filters.mortonorder Morton or z-order sorting of points. See http://en.wikipedia.org/wiki/Z-order_curve for more detail. filters.neighborclassifier Re-assign some point attributes based KNN voting filters.nndistance NN-Distance Filter filters.normal Normal Filter filters.optimalneighborhood OptimalNeighborhood Filter filters.outlier Outlier removal filters.overlay Assign values to a dimension based on the extent of an OGR-readable data source or an OGR SQL query. filters.planefit Plane Fit (Kutz et al., 2003) filters.pmf Progressive morphological filter filters.poisson Poisson Surface Reconstruction Filter filters.projpipeline Transform coordinates using Proj pipeline string, WKT2 coordinate operations or URN definition filters.radialdensity RadialDensity Filter filters.randomize Randomize points in a view. filters.range Pass only points given a dimension/range. filters.reciprocity Returns the percentage of neighbors that do NOT have the query point as a neighbor filters.reprojection Reproject data using GDAL from one coordinate system to another. filters.returns Split data by return order filters.sample Subsampling filter filters.separatescanline Split data by scan line. filters.shell Execute a shell operation inline with PDAL pipeline steps filters.skewnessbalancing Bartels & Wei Skewness Balancing filters.smrf Simple Morphological Filter (Pingel et al., 2013) filters.sort Sort data based on a given dimension. filters.splitter Split data based on a X/Y box length. filters.stats Compute statistics about each dimension (mean, min, max, etc.) filters.streamcallback Provide a hook for a simple point-by-point callback. filters.tail Return N points from end of the point cloud. filters.transformation Transform each point using a 4x4 transformation matrix filters.voxelcenternearestneighbor Voxel Center Nearest Neighbor Filter filters.voxelcentroidnearestneighbor Voxel Centroid Nearest Neighbor Filter filters.voxeldownsize First Entry Voxel Filter readers.bpf "Binary Point Format" (BPF) reader support. BPF is a simple DoD and research format that is used by some sensor and processing chains. readers.e57 Reader for E57 files readers.ept EPT Reader readers.faux Faux Reader readers.gdal Read GDAL rasters as point clouds. readers.hdf HDF Reader readers.i3s I3S Reader readers.icebridge NASA HDF5-based IceBridge ATM reader. See http://nsidc.org/data/docs/daac/icebridge/ilatm1b/index.html for more information. readers.ilvis2 ILVIS2 Reader readers.las ASPRS LAS 1.0 - 1.4 read support. LASzip support is also enabled through this driver if LASzip was found during compilation. readers.memoryview Memory View Reader readers.nitf NITF Reader readers.obj Obj Reader readers.optech Optech reader support. readers.pcd Read data in the Point Cloud Library (PCL) format. readers.pgpointcloud Read data from pgpointcloud format. "query" option needs to be a SQL statement selecting the data. readers.ply Read ply files. readers.pts Pts Reader readers.qfit QFIT Reader readers.sbet SBET Reader readers.slpk SLPK Reader readers.terrasolid TerraSolid Reader readers.text Text Reader readers.tiledb Read data from a TileDB array. readers.tindex TileIndex Reader writers.bpf "Binary Point Format" (BPF) writer support. BPF is a simple DoD and research format that is used by some sensor and processing chains. writers.e57 E57 format support. writers.ept_addon EPT Writer writers.gdal Write a point cloud as a GDAL raster. writers.gltf Gltf Writer writers.las ASPRS LAS 1.0 - 1.4 writer. LASzip support is also available if enabled at compile-time. Note that LAZ does not provide LAS 1.4 support at this time. writers.nitf NITF Writer writers.null Null writer. Provides a sink for points in a pipeline. It's the same as sending pipeline output to /dev/null. writers.ogr Write a point cloud as a set of OGR points/multipoints writers.pcd Write data in the Point Cloud Library (PCL) format. writers.pgpointcloud Write points to PostgreSQL pgpointcloud output writers.ply ply writer writers.raster Write a raster. writers.sbet SBET Writer writers.text Text Writer writers.tiledb Write data using TileDB. ============================ =============================================================================================================================================================================================================== ```


Environment (conda list):

$ conda list | grep pdal
pdal                      2.2.0                h638e970_7    conda-forge
python-pdal               2.4.0            py38h1fd1430_0    conda-forge
``` # packages in environment at /home/user/.conda/envs/roofs: # # Name Version Build Channel _libgcc_mutex 0.1 conda_forge conda-forge _openmp_mutex 4.5 1_gnu conda-forge alsa-lib 1.2.3 h516909a_0 conda-forge appdirs 1.4.4 pyh9f0ad1d_0 conda-forge argon2-cffi 20.1.0 py38h497a2fe_2 conda-forge async_generator 1.10 py_0 conda-forge attrs 21.2.0 pyhd8ed1ab_0 conda-forge backcall 0.2.0 pyh9f0ad1d_0 conda-forge backports 1.0 py_2 conda-forge backports.functools_lru_cache 1.6.4 pyhd8ed1ab_0 conda-forge binutils_impl_linux-64 2.35.1 h193b22a_2 conda-forge binutils_linux-64 2.35 h67ddf6f_30 conda-forge bleach 3.3.0 pyh44b312d_0 conda-forge boost-cpp 1.74.0 hc6e9bd1_3 conda-forge bzip2 1.0.8 h7f98852_4 conda-forge c-ares 1.17.1 h7f98852_1 conda-forge ca-certificates 2020.12.5 ha878542_0 conda-forge cached-property 1.5.2 hd8ed1ab_1 conda-forge cached_property 1.5.2 pyha770c72_1 conda-forge cairo 1.16.0 h6cf1ce9_1008 conda-forge certifi 2020.12.5 py38h578d9bd_1 conda-forge cffi 1.14.5 py38ha65f79e_0 conda-forge cfitsio 3.470 hb418390_7 conda-forge cftime 1.5.0 py38hb5d20a5_0 conda-forge clang_variant 1.0 cling_v0.8 conda-forge clangdev 5.0.0 h43905f9_1012 conda-forge cling 0.8 hf817b99_0 conda-forge cppzmq 4.7.1 hf7cf922_2 conda-forge curl 7.76.1 hea6ffbf_2 conda-forge cycler 0.10.0 py_2 conda-forge dbus 1.13.6 h48d8840_2 conda-forge decorator 5.0.9 pyhd8ed1ab_0 conda-forge defusedxml 0.7.1 pyhd8ed1ab_0 conda-forge double-conversion 3.1.5 h9c3ff4c_2 conda-forge eigen 3.3.9 h4bd325d_1 conda-forge entrypoints 0.3 pyhd8ed1ab_1003 conda-forge expat 2.3.0 h9c3ff4c_0 conda-forge ffmpeg 4.3.1 hca11adc_2 conda-forge flann 1.9.1 h2e58136_1008 conda-forge fontconfig 2.13.1 hba837de_1005 conda-forge freetype 2.10.4 h0708190_1 conda-forge freexl 1.0.6 h7f98852_0 conda-forge gcc_impl_linux-64 9.3.0 h70c0ae5_19 conda-forge gcc_linux-64 9.3.0 hf25ea35_30 conda-forge geos 3.9.1 h9c3ff4c_2 conda-forge geotiff 1.6.0 h2b14fbe_4 conda-forge gettext 0.19.8.1 h0b5b191_1005 conda-forge giflib 5.2.1 h36c2ea0_2 conda-forge gl2ps 1.4.2 h0708190_0 conda-forge glew 2.1.0 h9c3ff4c_2 conda-forge glib 2.68.2 h9c3ff4c_0 conda-forge glib-tools 2.68.2 h9c3ff4c_0 conda-forge gmp 6.2.1 h58526e2_0 conda-forge gnutls 3.6.13 h85f3911_1 conda-forge gst-plugins-base 1.18.4 hf529b03_2 conda-forge gstreamer 1.18.4 h76c114f_2 conda-forge gxx_impl_linux-64 9.3.0 hd87eabc_19 conda-forge gxx_linux-64 9.3.0 h3fbe746_30 conda-forge h5py 3.2.1 nompi_py38h9915d05_100 conda-forge hdf4 4.2.15 h10796ff_3 conda-forge hdf5 1.10.6 nompi_h6a2412b_1114 conda-forge icu 68.1 h58526e2_0 conda-forge imageio 2.9.0 py_0 conda-forge importlib-metadata 4.0.1 py38h578d9bd_0 conda-forge importlib_metadata 4.0.1 hd8ed1ab_0 conda-forge ipygany 0.5.0 pyhd8ed1ab_0 conda-forge ipykernel 5.5.5 py38hd0cf306_0 conda-forge ipython 7.23.1 py38hd0cf306_0 conda-forge ipython_genutils 0.2.0 py_1 conda-forge ipywidgets 7.6.3 pyhd3deb0d_0 conda-forge jedi 0.18.0 py38h578d9bd_2 conda-forge jinja2 3.0.1 pyhd8ed1ab_0 conda-forge jpeg 9d h36c2ea0_0 conda-forge json-c 0.15 h98cffda_0 conda-forge jsoncpp 1.9.4 h4bd325d_2 conda-forge jsonschema 3.2.0 pyhd8ed1ab_3 conda-forge jupyter 1.0.0 py38h578d9bd_6 conda-forge jupyter_client 6.1.12 pyhd8ed1ab_0 conda-forge jupyter_console 6.4.0 pyhd8ed1ab_0 conda-forge jupyter_core 4.7.1 py38h578d9bd_0 conda-forge jupyterlab_pygments 0.1.2 pyh9f0ad1d_0 conda-forge jupyterlab_widgets 1.0.0 pyhd8ed1ab_1 conda-forge kealib 1.4.14 hcc255d8_2 conda-forge kernel-headers_linux-64 2.6.32 h77966d4_13 conda-forge kiwisolver 1.3.1 py38h1fd1430_1 conda-forge krb5 1.19.1 hcc1bbae_0 conda-forge lame 3.100 h7f98852_1001 conda-forge laszip 3.4.3 he1b5a44_1 conda-forge laz-perf 2.0.0 h9c3ff4c_0 conda-forge lcms2 2.12 hddcbb42_0 conda-forge ld_impl_linux-64 2.35.1 hea4e1c9_2 conda-forge libblas 3.9.0 9_openblas conda-forge libcblas 3.9.0 9_openblas conda-forge libclang 11.1.0 default_ha53f305_1 conda-forge libcurl 7.76.1 h2574ce0_2 conda-forge libdap4 3.20.6 hd7c4107_2 conda-forge libedit 3.1.20191231 he28a2e2_2 conda-forge libev 4.33 h516909a_1 conda-forge libevent 2.1.10 hcdb4288_3 conda-forge libffi 3.3 h58526e2_2 conda-forge libgcc-devel_linux-64 9.3.0 h7864c58_19 conda-forge libgcc-ng 9.3.0 h2828fa1_19 conda-forge libgdal 3.2.1 h38ff51b_7 conda-forge libgfortran-ng 9.3.0 hff62375_19 conda-forge libgfortran5 9.3.0 hff62375_19 conda-forge libglib 2.68.2 h3e27bee_0 conda-forge libglu 9.0.0 he1b5a44_1001 conda-forge libgomp 9.3.0 h2828fa1_19 conda-forge libiconv 1.16 h516909a_0 conda-forge libkml 1.3.0 h238a007_1013 conda-forge liblapack 3.9.0 9_openblas conda-forge libllvm11 11.1.0 hf817b99_2 conda-forge libnetcdf 4.7.4 nompi_h56d31a8_107 conda-forge libnghttp2 1.43.0 h812cca2_0 conda-forge libogg 1.3.4 h7f98852_1 conda-forge libopenblas 0.3.15 pthreads_h8fe5266_1 conda-forge libopus 1.3.1 h7f98852_1 conda-forge libpng 1.6.37 h21135ba_2 conda-forge libpq 13.3 hd57d9b9_0 conda-forge librttopo 1.1.0 h1185371_6 conda-forge libsodium 1.0.18 h36c2ea0_1 conda-forge libspatialite 5.0.1 he52d314_3 conda-forge libssh2 1.9.0 ha56f1ee_6 conda-forge libstdcxx-devel_linux-64 9.3.0 hb016644_19 conda-forge libstdcxx-ng 9.3.0 h6de172a_19 conda-forge libtheora 1.1.1 h7f98852_1005 conda-forge libtiff 4.2.0 hbd63e13_2 conda-forge libuuid 2.32.1 h7f98852_1000 conda-forge libvorbis 1.3.7 h9c3ff4c_0 conda-forge libwebp-base 1.2.0 h7f98852_2 conda-forge libxcb 1.13 h7f98852_1003 conda-forge libxkbcommon 1.0.3 he3ba5ed_0 conda-forge libxml2 2.9.12 h72842e0_0 conda-forge libzip 1.7.3 h4de3113_0 conda-forge loguru 0.5.3 py38h578d9bd_2 conda-forge lz4-c 1.9.3 h9c3ff4c_0 conda-forge markupsafe 2.0.1 py38h497a2fe_0 conda-forge matplotlib 3.4.2 py38h578d9bd_0 conda-forge matplotlib-base 3.4.2 py38hcc49a3a_0 conda-forge matplotlib-inline 0.1.2 pyhd8ed1ab_2 conda-forge meshio 4.4.3 pyhd8ed1ab_0 conda-forge mistune 0.8.4 py38h497a2fe_1003 conda-forge munch 2.5.0 py_0 conda-forge mysql-common 8.0.23 ha770c72_2 conda-forge mysql-libs 8.0.23 h935591d_2 conda-forge nb_conda_kernels 2.3.1 py38h578d9bd_0 conda-forge nbclient 0.5.3 pyhd8ed1ab_0 conda-forge nbconvert 6.0.7 py38h578d9bd_3 conda-forge nbformat 5.1.3 pyhd8ed1ab_0 conda-forge ncurses 6.2 h58526e2_4 conda-forge nest-asyncio 1.5.1 pyhd8ed1ab_0 conda-forge netcdf4 1.5.6 nompi_py38hf887595_102 conda-forge nettle 3.6 he412f7d_0 conda-forge nitro 2.7.dev6 he1b5a44_3 conda-forge nlohmann_json 3.9.1 h9c3ff4c_1 conda-forge notebook 6.4.0 pyha770c72_0 conda-forge nspr 4.30 h9c3ff4c_0 conda-forge nss 3.65 hb5efdd6_0 conda-forge numpy 1.20.3 py38h9894fe3_0 conda-forge olefile 0.46 pyh9f0ad1d_1 conda-forge openh264 2.1.1 h780b84a_0 conda-forge openjpeg 2.4.0 hb52868f_1 conda-forge openssl 1.1.1k h7f98852_0 conda-forge packaging 20.9 pyh44b312d_0 conda-forge pandoc 2.13 h7f98852_0 conda-forge pandocfilters 1.4.2 py_1 conda-forge parso 0.8.2 pyhd8ed1ab_0 conda-forge pcl 1.11.1 h39b1736_3 conda-forge pcre 8.44 he1b5a44_0 conda-forge pdal 2.2.0 h638e970_7 conda-forge pexpect 4.8.0 pyh9f0ad1d_2 conda-forge pickleshare 0.7.5 py_1003 conda-forge pillow 8.2.0 py38ha0e1e83_1 conda-forge pip 21.1.1 pyhd8ed1ab_0 conda-forge pixman 0.40.0 h36c2ea0_0 conda-forge poppler 0.89.0 h2de54a5_5 conda-forge poppler-data 0.4.10 0 conda-forge postgresql 13.3 h2510834_0 conda-forge proj 7.2.0 h277dcde_2 conda-forge prometheus_client 0.10.1 pyhd8ed1ab_0 conda-forge prompt-toolkit 3.0.18 pyha770c72_0 conda-forge prompt_toolkit 3.0.18 hd8ed1ab_0 conda-forge pthread-stubs 0.4 h36c2ea0_1001 conda-forge ptyprocess 0.7.0 pyhd3deb0d_0 conda-forge pugixml 1.11.4 h9c3ff4c_0 conda-forge pycparser 2.20 pyh9f0ad1d_2 conda-forge pygments 2.9.0 pyhd8ed1ab_0 conda-forge pyparsing 2.4.7 pyh9f0ad1d_0 conda-forge pyqt 5.12.3 py38h578d9bd_7 conda-forge pyqt-impl 5.12.3 py38h7400c14_7 conda-forge pyqt5-sip 4.19.18 py38h709712a_7 conda-forge pyqtchart 5.12 py38h7400c14_7 conda-forge pyqtwebengine 5.12.1 py38h7400c14_7 conda-forge pyrsistent 0.17.3 py38h497a2fe_2 conda-forge python 3.8.10 h49503c6_1_cpython conda-forge python-dateutil 2.8.1 py_0 conda-forge python-pdal 2.4.0 py38h1fd1430_0 conda-forge python_abi 3.8 1_cp38 conda-forge pyvista 0.30.1 pyhd8ed1ab_0 conda-forge pyzmq 22.0.3 py38h2035c66_1 conda-forge qhull 2020.2 h4bd325d_1 conda-forge qt 5.12.9 hda022c4_4 conda-forge qtconsole 5.1.0 pyhd8ed1ab_0 conda-forge qtpy 1.9.0 py_0 conda-forge readline 8.1 h46c0cb4_0 conda-forge scooby 0.5.7 pyhd8ed1ab_0 conda-forge send2trash 1.5.0 py_0 conda-forge setuptools 49.6.0 py38h578d9bd_3 conda-forge shapely 1.7.1 py38haeee4fe_4 conda-forge six 1.16.0 pyh6c4a22f_0 conda-forge sqlite 3.35.5 h74cdb3f_0 conda-forge sysroot_linux-64 2.12 h77966d4_13 conda-forge tbb 2020.2 h4bd325d_4 conda-forge tbb-devel 2020.2 h4bd325d_4 conda-forge terminado 0.10.0 py38h578d9bd_0 conda-forge testpath 0.5.0 pyhd8ed1ab_0 conda-forge tiledb 2.2.9 h91fcb0e_0 conda-forge tk 8.6.10 h21135ba_1 conda-forge tornado 6.1 py38h497a2fe_1 conda-forge traitlets 5.0.5 py_0 conda-forge traittypes 0.2.1 pyh9f0ad1d_2 conda-forge transforms3d 0.3.1 py_0 conda-forge tzcode 2021a h7f98852_1 conda-forge tzdata 2021a he74cb21_0 conda-forge utfcpp 3.2 ha770c72_0 conda-forge vtk 9.0.1 no_osmesa_py38hc2cec6c_106 conda-forge wcwidth 0.2.5 pyh9f0ad1d_2 conda-forge webencodings 0.5.1 py_1 conda-forge wheel 0.36.2 pyhd3deb0d_0 conda-forge widgetsnbextension 3.5.1 py38h578d9bd_4 conda-forge x264 1!161.3030 h7f98852_0 conda-forge xerces-c 3.2.3 h9d8b166_2 conda-forge xeus 1.0.1 h7d0c39e_2 conda-forge xeus-cling 0.12.1 h560cc44_0 conda-forge xorg-kbproto 1.0.7 h7f98852_1002 conda-forge xorg-libice 1.0.10 h7f98852_0 conda-forge xorg-libsm 1.2.3 hd9c2040_1000 conda-forge xorg-libx11 1.7.1 h7f98852_0 conda-forge xorg-libxau 1.0.9 h7f98852_0 conda-forge xorg-libxdmcp 1.1.3 h7f98852_0 conda-forge xorg-libxext 1.3.4 h7f98852_1 conda-forge xorg-libxrender 0.9.10 h7f98852_1003 conda-forge xorg-libxt 1.2.1 h7f98852_2 conda-forge xorg-renderproto 0.11.1 h7f98852_1002 conda-forge xorg-xextproto 7.3.0 h7f98852_1002 conda-forge xorg-xproto 7.0.31 h7f98852_1007 conda-forge xtl 0.7.2 h4bd325d_1 conda-forge xz 5.2.5 h516909a_1 conda-forge zeromq 4.3.4 h9c3ff4c_0 conda-forge zipp 3.4.1 pyhd8ed1ab_0 conda-forge zlib 1.2.11 h516909a_1010 conda-forge zstd 1.4.9 ha95c52a_0 conda-forge ```


Details about conda and system ( conda info ):

``` active environment : roofs active env location : /home/user/.conda/envs/roofs shell level : 1 user config file : /home/user/.condarc populated config files : /opt/mambaforge/.condarc /home/user/.condarc conda version : 4.10.1 conda-build version : not installed python version : 3.9.2.final.0 virtual packages : __linux=5.10.38=0 __glibc=2.33=0 __unix=0=0 __archspec=1=x86_64 base environment : /opt/mambaforge (read only) conda av data dir : /opt/mambaforge/etc/conda conda av metadata url : https://repo.anaconda.com/pkgs/main channel URLs : https://conda.anaconda.org/conda-forge/linux-64 https://conda.anaconda.org/conda-forge/noarch package cache : /opt/mambaforge/pkgs /home/users/.conda/pkgs envs directories : /home/user/.conda/envs /opt/mambaforge/envs platform : linux-64 user-agent : conda/4.10.1 requests/2.25.1 CPython/3.9.2 Linux/5.10.38-1-MANJARO manjaro/21.0.4 glibc/2.33 UID:GID : 1000:1000 netrc file : /home/user/.netrc offline mode : False ```

Am I missing something in the installation process?

LHolst commented 3 years ago

The shared libraries from python-pdal won't get picked up via the PDAL_DRIVER_PATH when conda environment is activated.

You can put the following activation script as pdal-python-fixup-driver-path-activate.sh in $CONDA_PREFIX/etc/conda/activate.d/. In your case $CONDA_PREFIX is /home/user/.conda/envs/roofs .

#!/bin/bash

# add  py site-packages pdal to PDAL_DRIVER_PATH
# .so files are in pdal subdirectory

if [[ -n "$PDAL_DRIVER_PATH" ]]; then
    export _CONDA_SET_PDAL_PYTHON_DRIVER_PATH=$PDAL_DRIVER_PATH
fi

SITE_PACKAGES_PDAL=$(python -c 'import site; import os.path; site_packages_pdal = os.path.join(site.getsitepackages()[0], "pdal"); print( site_packages_pdal if os.path.exists(site_packages_pdal) else "")')

if [[ ! -z "$SITE_PACKAGES_PDAL" ]]; then
    export PDAL_DRIVER_PATH=$_CONDA_SET_PDAL_PYTHON_DRIVER_PATH:$SITE_PACKAGES_PDAL
fi

The script appends the site-package path containing python-pdal's .so libraries

derived from python-pdal's activation script https://github.com/conda-forge/python-pdal-feedstock/blob/98a8af3cee1734e5c14999bee75f7645b91c7263/recipe/scripts/activate.sh

conda documentation about activating env vars https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#macos-and-linux

hobu commented 3 years ago

@LHolst if you make a PR against python-pdal to fix this activation script, I would be happy to merge it.