PDAL / python

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

import pdal : Can't load library, no such file #161

Closed NanBlanc closed 3 months ago

NanBlanc commented 6 months ago

Hi, I try to setup a conda env in python 3.8 with python-pdal. I am using Ubuntu 20.04. I followed the following intructions :

conda create -n floitd pyhton=3.8
mamba install -c conda-forge python-pdal gdal

Then i do

python
>>>import pdal

and get :

(PDAL Error) Can't load library /home/ostocker/miniconda3/envs/floitd/lib/libpdal_plugin_filter_trajectory.so: Failed to load "/home/ostocker/miniconda3/envs/floitd/lib/libpdal_plugin_filter_trajectory.so": libglog.so.1: cannot open shared object file: No such file or directorypj_obj_create: Open of /home/ostocker/miniconda3/envs/floitd/share/proj failed
pj_obj_create: Open of /home/ostocker/miniconda3/envs/floitd/share/proj failed
pj_obj_create: Open of /home/ostocker/miniconda3/envs/floitd/share/proj failed
pj_obj_create: Open of /home/ostocker/miniconda3/envs/floitd/share/proj failed
(PDAL Error) Can't load library /home/ostocker/miniconda3/envs/floitd/lib/libpdal_plugin_filter_trajectory.so: Failed to load "/home/ostocker/miniconda3/envs/floitd/lib/libpdal_plugin_filter_trajectory.so": libglog.so.1: cannot open shared object file: No such file or directorypj_obj_create: Open of /home/ostocker/miniconda3/envs/floitd/share/proj failed
pj_obj_create: Open of /home/ostocker/miniconda3/envs/floitd/share/proj failed
pj_obj_create: Open of /home/ostocker/miniconda3/envs/floitd/share/proj failed
pj_obj_create: Open of /home/ostocker/miniconda3/envs/floitd/share/proj failed

I checked in my /home/ostocker/miniconda3/envs/floitd/lib/ folder, and i do have :

but no libglog.so.1 nor libpdal_plugin_filter_trajectory.so

conda install -c conda-forge python-pdal gdal resulted in the same error, and pip install had a wheel compilation error.

What should i do ?

hobu commented 6 months ago

Does it work with 3.9+?

NanBlanc commented 6 months ago

No (pyhton=3.9), same error, but this time i have no others libraries with the same name

hobu commented 6 months ago

confirmed. We need to rerender things. You can grab an older build of glog

mamba install glog=0.6.0

NanBlanc commented 6 months ago

Ok, doing mamba install glog=0.6.0 seems to have solved my problem, But i still have his error :

pj_obj_create: Open of /home/ostocker/miniconda3/envs/floitd/share/proj failed
pj_obj_create: Open of /home/ostocker/miniconda3/envs/floitd/share/proj failed
pj_obj_create: Open of /home/ostocker/miniconda3/envs/floitd/share/proj failed
pj_obj_create: Open of /home/ostocker/miniconda3/envs/floitd/share/proj failed
pj_obj_create: Open of /home/ostocker/miniconda3/envs/floitd/share/proj failed
pj_obj_create: Open of /home/ostocker/miniconda3/envs/floitd/share/proj failed
pj_obj_create: Open of /home/ostocker/miniconda3/envs/floitd/share/proj failed
pj_obj_create: Open of /home/ostocker/miniconda3/envs/floitd/share/proj failed

Not sure to understand it

Firstero commented 6 months ago

macos python 3.10 the same error, after import pdal, can't load libpdal_plugin_filter_trajectory.so install by conda -c conda-forge

NanBlanc commented 6 months ago

@Firstero They may have made changes since yesterday. It looks like now, doing mamba install glog=0.6.0 is no longer required, and even worse, it makes the error reappear. To solve, just reinstall the most recent version of glog with doing conda install glog

hobu commented 3 months ago

Please reopen if the issue with glog is still a problem.