I am able to read .las file in Python using laspy in Windows as below:

las_filename = 'abc.las'
inFile = laspy.file.File(las_filename, mode='r')

But when I put a .laz file in this code, I get the below error:

LaspyException: Error mapping file: Laszip was not found on the system

How to directly read a .laz file as I do with .las file or if there is a way in Python to convert .laz to .las and then read it?


2 Answers 2

import pylas 

las = pylas.read('D:/Research/LiDAR/LAZ_2/20150403_319050.laz')    
las = pylas.convert(las)    
  • 3
    How does this code relate to the Laszip was not found on the system issue? Please edit the answer to provide more information
    – nmtoken
    Apr 2, 2020 at 12:43
  • 1
    I think that this solution is a great one and a simple workaround. pylas depends on lazrs, which can be installed through "pip" and does not depends on laszip. I've just tested the code in Google Colab and it works perfectly. Sep 22, 2020 at 10:19
  • @Guadancil11 Thanks for your comment and for identifying the library that I needed to install. This was the exact information I needed to fix a script I had written for batch filtering of vegetation. Apr 12, 2022 at 16:23

The error message is not very helpful unfortunately.

You are missing the required library LASzip on your system as well as the laszip.exe tool.

For Windows you can get the LASzip DLL file from the archive the LAStools project provides at https://lastools.github.io/download/LAStools.zip

You can find it in LAStools/LASzip/dll/ in said archive.

For quick and dirty solution you should be able to simply place the appropriate LASzip DLL (probably LASzip64.dll) into the same directory as your Python script. If that does not work or for a proper installation, check the sister site https://superuser.com/ or other sources for how to install libraries on Windows.

Do the same for the laszip.exe and/or laszip64.exe from LAStools/bin/.

Then it should not give this error anymore.

  • So, I don't need to change anything just .laz file insted of .las file as in above code? Aug 20, 2019 at 9:03
  • If yes, then your answer doesn't works. It gives me the same error after putting the required dll file in the folder where the script resides. Aug 20, 2019 at 9:12
  • Did you launch the Python interpreter in the same directory that your script and the DLL(s) is in? Aug 20, 2019 at 11:06
  • 1
    Sorry,I missed something. Updated the answer, please try again. Aug 20, 2019 at 13:05
  • 1
    Working. Thanks. It was the laszip.exe file which was missing. Aug 21, 2019 at 7:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.