lidar supports a variety of platforms, including Microsoft Windows, macOS, and Linux operating systems. Note that you will need to have Python 3.x (< 3.9) installed. Python 2.x is not supported. lidar is available on both PyPI and conda-forge. lidar has a GDAL dependency, which can be challenging to install using pip on Windows. Therefore, it is highly recommended to install lidar from the conda-forge channel. If you encounter any errors, please check the Dependencies section below.
Install from PyPI¶
To install lidar from PyPI, run this command in your terminal:
Install from conda-forage¶
1 2 3
If you have installed lidar before and want to upgrade to the latest version, you can run the following command in your terminal:
If you use conda, you can update lidar to the latest version by running the following command in your terminal:
To install the development version from GitHub directly using Git, run the following code:
lidar's Python dependencies are listed in its requirements.txt file. In addition, lidar has a C library dependency: GDAL >=1.11.2. How to install GDAL in different operating systems will be explained below. More informaton about GDAL can be found here.
The following commands can be used to install GDAL for Debian-based Linux distributions (e.g., Ubuntu, Linux Mint).
1 2 3
If you encounter any compiling errors, try the following commands.
1 2 3
The following commands can be used to install GDAL for Pacman-based Linux distributions (e.g., Arch Linux, Manjaro). You might need to use sudo if you encounter permission errors.
1 2 3
For a Homebrew based Python environment, do the following.
Alternatively, you can install GDAL binaries from kyngchaos. You will
then need to add the installed location
/Library/Frameworks/GDAL.framework/Programs to your system path.
The instruction below assumes that you have installed Anaconda. Open Anaconda Prompt and enter the following commands to create a conda environment and install required packages
1 2 3
When installing the lidar package, if you encounter an error
Microsoft Visual C++ 14.0 is required, please follow the steps
below to fix the error and reinstall lidar. More infomration can
be found at this link Fix Python 3 on Windows error - Microsoft Visual C++ 14.0 is required.
- Download Microsoft Build Tools for Visual Studio 2017
- Double click to install the downloaded installer - Microsoft Build Tools for Visual Studio 2017.
- Open Microsoft Build Tools for Visual Studio 2017
- Select Workloads --> Visual C++ build tools and click the install button