简体   繁体   中英

Error “specified module could not found”

I just installed the Liblas with pip:

C:\Users\Geri>pip install liblas
Requirement already satisfied (use --upgrade to upgrade): liblas in c:\python27\arcgis10.2\lib\site-packages
Requirement already satisfied (use --upgrade to upgrade): setuptools in c:\python27\arcgis10.2\lib\site-packages (from liblas)

when I want to import the module, I got the following:

>>> import liblas
Runtime error 
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Python27\ArcGIS10.2\lib\site-packages\liblas\__init__.py", line 2, in <module>
    from core import get_version
  File "C:\Python27\ArcGIS10.2\lib\site-packages\liblas\core.py", line 136, in <module>
    las = ctypes.CDLL(lib_name)
  File "C:\Python27\ArcGIS10.2\Lib\ctypes\__init__.py", line 365, in __init__
    self._handle = _dlopen(self._name, mode)
WindowsError: [Error 126] The specified module could not be found

Please help

My solution was to ensure that liblas.dll and liblas_c.dll were in the DLLs folder in all my python instances (I have python 2.7 in ArcGIS, OSGeo4W and WinPython).

I found the dll's in C:\\Python27\\ArcGIS10.2\\DLLs after trying every method I could find for installing the liblas package (WinPython control panel, pip and installing using the exe from https://pypi.python.org/pypi/libLAS/1.6.0 ).

I have not tried using liblas via OSGeo4w as I am not sure where to put the dlls (I put them in the C:/OSgeo4w64/bin folder but that did not help) and OSgeo4w command_line package list in the installer tells me that liblas is not available. I also ensured that C:/OSgeo4w64/bin is in my path (as that was a suggestion above and elsewhere)... not sure if that helped.

All working fine now.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM