Skip to content
Chris Choy edited this page Apr 15, 2020 · 30 revisions

Installing the Minkowski Engine

System Python

sudo apt install libopenblas-dev
pip install MinkowskiEngine

From the Source

sudo apt install libopenblas-dev
git clone https://github.com/StanfordVL/MinkowskiEngine.git
cd MinkowskiEngine
python setup.py install

If you have multiple python versions and want to specify the version, define an environment variable to install the Minkowski Engine on the specified version.

export PYTHON=python3.7
$PYTHON setup.py install

With Anaconda

conda install mkl mkl-include -c intel
conda install pytorch -c pytorch
git clone https://github.com/StanfordVL/MinkowskiEngine.git
cd MinkowskiEngine
python setup.py install --blas=mkl

Specifying BLAS directory

export BLAS_INCLUDE_DIRS=$OPENBLAS_ROOT/include/
export BLAS_LIBRARY_DIRS=$OPENBLAS_ROOT/lib/
python setup.py install --blas=openblas

Specifying CXX

/usr/local/cuda/include/crt/host_config.h:138:2: error: #error -- unsupported GNU version! gcc versions later than 8 are not supported!

sudo apt install g++-8
export CXX=gcc-8; python setup.py install

Possible compilation error with torch 1.4

In a very rare case, you might get compilation errors

error: cannot call member function `void std::basic_string<_CharT, _Traints, _Alloc>::_Rep::_M_set_sharable() ....` without object

[2020-04-15] Using torch 1.3.1 solved a problem

With Docker

https://github.com/StanfordVL/MinkowskiEngine/issues/88