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?


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? – Sajjadmanal Aug 20 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. – Sajjadmanal Aug 20 at 9:12
  • Did you launch the Python interpreter in the same directory that your script and the DLL(s) is in? – bugmenot123 Aug 20 at 11:06
  • 1
    Sorry,I missed something. Updated the answer, please try again. – bugmenot123 Aug 20 at 13:05
  • 1
    Working. Thanks. It was the laszip.exe file which was missing. – Sajjadmanal Aug 21 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.