Closed mz8i closed 2 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
@LHolst if you make a PR against python-pdal to fix this activation script, I would be happy to merge it.
Issue: I installed pdal and python-pdal, but it seems that the python plugin is not present:
Environment (
conda list
):Details about
conda
and system (conda info
):Am I missing something in the installation process?