This article captures the changes required to install the Neighbourhood Graph and Tree for Indexing on Mac OSX.
The GitHub repo is available here: https://github.com/yahoojapan/NGT
Initial NGT Installation
$ unzip NGT-x.x.x.zip
$ cd NGT-x.x.x
$ mkdir build
$ cd build
$ cmake .. ## (for non-MAC)
For Mac OSX, the above command needs to be replaced with the below one. Also, need to install GNU cc/c++ from brew.
$ cmake -DCMAKE_C_COMPILER=/usr/local/bin/gcc-8 -DCMAKE_CXX_COMPILER=/usr/local/bin/g++-8 ..
$ make
$ make install
$ ldconfig
The above 'ldconfig' command works for Linux/Unix. For Mac OSX, it has to be:
$ sudo update_dyld_shared_cache
NGT Python installation
$ cd NGT_ROOT/python
$ python setup.py sdist
$ pip install dist/ngt-1.2.0.tar.gz
For the above command, use the following command (after GNU cc/c++ installed)
$ env CC=/usr/local/bin/gcc-8 CXX=/usr/local/bin/g++-8 pip install dist/ngt-1.2.0.tar.gz
No comments:
Post a Comment