PDAL / python

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

PDAL Python not working when installed with pip #120

Closed ClementAlba closed 2 years ago

ClementAlba commented 2 years ago

Hi,

I'm currently working on a pip package using pdal so I have to put it in the dependencies. When I install my package with pip, the latest version of PDAL is installed (3.1.2) but when I use my package, I get the following error :

Traceback (most recent call last):
  File "D:\APPS\Conda\environnements\pdal-parallelizer-test\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "D:\APPS\Conda\environnements\pdal-parallelizer-test\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "D:\APPS\Conda\environnements\pdal-parallelizer-test\Scripts\pdal-parallelizer.exe\__main__.py", line 4, in <module>
  File "D:\APPS\Conda\environnements\pdal-parallelizer-test\lib\site-packages\pdal_parallelizer\__main__.py", line 13, in <module>
    from . import do
  File "D:\APPS\Conda\environnements\pdal-parallelizer-test\lib\site-packages\pdal_parallelizer\do.py", line 7, in <module>
    from . import tile
  File "D:\APPS\Conda\environnements\pdal-parallelizer-test\lib\site-packages\pdal_parallelizer\tile.py", line 6, in <module>
    import pdal
  File "D:\APPS\Conda\environnements\pdal-parallelizer-test\lib\site-packages\pdal\__init__.py", line 4, in <module>
    from . import libpdalpython
ImportError: DLL load failed while importing libpdalpython: Le module spécifié est introuvable.

Moreover, when I install python-pdal with conda I don't have any problem.

Did i do something wrong ? Or did someone encounter the same problem and fix it ?

Thanks in advance ! :)

hobu commented 2 years ago

The PDAL Python bindings require the main PDAL library installed. If you install python-pdal via Conda, it has that library as a dependency and installs it for you.