Install

VLFeat installation

Besides third-parties python packages, CARS depends on VLFeat. If this tool is not already installed on your system, you will need to compile it as follows:

$ git clone https://github.com/CNES/vlfeat.git
$ cd vlfeat && make && cd ..

then you will need to update the following environment variables for compilation:

$ export CFLAGS="-I$PWD/vlfeat"
$ export LDFLAGS="-L$PWD/vlfeat/bin/glnxa64"

and the following environment variable for execution:

$ export LD_LIBRARY_PATH=$PWD/vlfeat/bin/glnxa64:$LD_LIBRARY_PATH

Install from PyPI (option 1)

To install CARS like any other python library, you can use a virtual environment:

$ python -m venv venv
$ source ./venv/bin/activate
$ pip install --upgrade "pip<=23.0.1" "numpy>=1.17.0" "cython<3.0.0"

and install it from PyPI:

$ pip install cars

Install from source repository (option 2)

You can also clone CARS repository:

$ git clone --depth 1 https://github.com/CNES/cars.git # For latest version
$ git clone --depth 1 --branch LAST_TAG https://github.com/CNES/cars.git # For latest stable version (replace LAST TAG by desired tag)

then, you must specify the location of the vlfeat directories:

$ export VLFEAT_INCLUDE_DIR=$PWD/vlfeat
$ export VLFEAT_LIBRARY_DIR=$PWD/vlfeat/bin/glnxa64

finally, you execute makefile target:

$ cd cars && make install-dev-otb-free