-
Notifications
You must be signed in to change notification settings - Fork 369
Installation
Chris Choy edited this page Jun 17, 2020
·
30 revisions
sudo apt install libopenblas-dev
pip install MinkowskiEngine
sudo apt install libopenblas-dev
pip install -U git+https://github.com/StanfordVL/MinkowskiEngine
# If it gives you "Unsupported GNU version!" use
# export CXX=g++-7; pip install git+https://github.com/StanfordVL/MinkowskiEngine
Use the environment variable CXX
to control the compiler.
export CXX=g++-7; pip install git+https://github.com/StanfordVL/MinkowskiEngine
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
# export CXX=g++-7; If you have an older version of GCC.
pip install -U git+https://github.com/StanfordVL/MinkowskiEngine \
\ # if you want to force cuda installation
--install-option="--force_cuda" \
\ # if you want to force no cuda installation. force_cuda supercedes cpu_only
--install-option="--cpu_only" \
\ # optional when torch fails to find cuda_home.
--install-option="--cuda_home=<cuda_home>" \
\ # override to openblas, atlas, mkl, blas
--install-option="--blas=<blas>" \
\ # blas include and library path if default ones fail
--install-option="--blas_include_dirs=<csv>" \
--install-option="--blas_library_dirs=<csv>"
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
/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++-7
export CXX=gcc-7; python setup.py install
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] Got a report that using torch 1.3.1 solved the issue, but it is unclear what exactly caused the problem.
error: invalid static_cast from type ‘const torch::OrderedDict<std::basic_string<char>, at::Tensor>’ to type ‘torch::OrderedDict<std::basic_string<char>, at::Tensor>&
To install g++ > 6, https://linuxize.com/post/how-to-install-gcc-compiler-on-ubuntu-18-04/
sudo apt install software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install g++-7
A related issue can be found at #124
/usr/include/c++/7/bits/basic_string.tcc:1067:16: error: cannot call member function ‘void std::basic_string<_CharT, _Traits, _Alloc>::_Rep::_M_set_sharable() [with _CharT = char16_t; _Traits = std::char_traits<char16_t>; _Alloc = std::allocator<char16_t>]’ without object
__p->_M_set_sharable();
Use g++-7
.
sudo apt install g++-7
export CXX=g++-7; pip install MinkowskiEngine
https://github.com/StanfordVL/MinkowskiEngine/issues/135 https://github.com/StanfordVL/MinkowskiEngine/issues/88