Opened 15 years ago

Closed 13 years ago

#119 closed defect (fixed)

liblas Python does not install liblas .dll into OSGeo4W\bin folder

Reported by: williamskg6 Owned by: hobu
Priority: blocker Component: Installer
Version: Keywords: liblas, python
Cc:

Description

If you install the liblas-python package from the OSGeo4W installer, liblas is not available to the OSGeo4W Python installation - you can't use the liblas library from python at all because it can't find the .dll.

What appears to be missing are the .dlls in the OSGeo4W\bin folder. I was able to fix the problem by downloading the liblas windows 32 package from liblas.org and copying the contents of the bin folder into the OSGeo4W\bin folder.

Change History (7)

comment:1 by warmerdam, 15 years ago

Owner: changed from osgeo4w-dev@… to hobu

comment:2 by hobu, 15 years ago

What happens if you choose to install the other liblas packages (dev/bin)? Do things end up in the right spot? The dependency chain of liblas' python bindings might not be correct.

comment:3 by williamskg6, 15 years ago

Installing the Dev packages doesn't fix the problem. I've found that the easiest way to find out if the libraries are installed correctly is to run the following command in Python:

from liblas import file

This will fail if the .dll is not in the right place, with the following error:

Traceback (most recent call last):

File "<stdin>", line 1, in <module> File "C:\OSGeo4W\apps\Python25\lib\site-packages\liblas\init.py", line 1,

in <module>

from core import *

File "C:\OSGeo4W\apps\Python25\lib\site-packages\liblas\core.py", line 121, in

<module>

las = ctypes.CDLL(lib_name)

File "C:\OSGeo4W\apps\Python25\lib\ctypes\init.py", line 348, in init

self._handle = _dlopen(self._name, mode)

WindowsError: [Error 126] The specified module could not be found

in reply to:  2 comment:4 by williamskg6, 15 years ago

Replying to hobu:

What happens if you choose to install the other liblas packages (dev/bin)? Do things end up in the right spot? The dependency chain of liblas' python bindings might not be correct.

Unfortunately, the fix I described above no longer works. Now I get an error stating that LASHeader_GetProj4 is not found. I have tried installing Proj4 and still get the same error. Any ideas?

comment:5 by williamskg6, 15 years ago

Priority: majorblocker

in reply to:  5 comment:6 by williamskg6, 15 years ago

Here's the error now (after pasting the contents of liblas win32 \bin folder into the OSGeo4W\bin folder):

from liblas import file

Traceback (most recent call last):

File "<stdin>", line 1, in <module> File "C:\OSGeo4W\apps\Python25\lib\site-packages\liblas\init.py", line 1,

in <module>

from core import *

File "C:\OSGeo4W\apps\Python25\lib\site-packages\liblas\core.py", line 431, in

<module>

las.LASHeader_GetProj4.argtypes = [ctypes.c_void_p]

File "C:\OSGeo4W\apps\Python25\lib\ctypes\init.py", line 361, in getattr

func = self.getitem(name)

File "C:\OSGeo4W\apps\Python25\lib\ctypes\init.py", line 366, in getitem

func = self._FuncPtr((name_or_ordinal, self))

AttributeError: function 'LASHeader_GetProj4' not found

comment:7 by maphew, 13 years ago

Resolution: fixed
Status: newclosed

With the current version, liblas-python 1.7.0, the liblas utilities are listed as a dependency and the required dll's installed in %osgeo4w_root%\bin, pending some packaging issues (see #255).

Please re-open if this doesn't prove to be true for you.

Note: See TracTickets for help on using tickets.