{"id":23415314,"url":"https://github.com/mlampros/nmslibr","last_synced_at":"2026-03-18T01:02:45.523Z","repository":{"id":56934635,"uuid":"123143819","full_name":"mlampros/nmslibR","owner":"mlampros","description":"Non Metric Space ( Approximate ) Library in R","archived":false,"fork":false,"pushed_at":"2023-02-02T18:12:44.000Z","size":2899,"stargazers_count":12,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T04:04:24.158Z","etag":null,"topics":["approximate-nearest-neighbor-search","nmslib","non-metric","python","r","reticulate"],"latest_commit_sha":null,"homepage":"https://mlampros.github.io/nmslibR/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mlampros.png","metadata":{"funding":{"github":["mlampros"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null},"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-02-27T14:52:02.000Z","updated_at":"2023-02-14T20:52:29.000Z","dependencies_parsed_at":"2023-01-24T19:15:51.973Z","dependency_job_id":"9d9620c5-5222-41d9-bd29-0b40b35939c4","html_url":"https://github.com/mlampros/nmslibR","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlampros%2FnmslibR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlampros%2FnmslibR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlampros%2FnmslibR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlampros%2FnmslibR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mlampros","download_url":"https://codeload.github.com/mlampros/nmslibR/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248534807,"owners_count":21120434,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["approximate-nearest-neighbor-search","nmslib","non-metric","python","r","reticulate"],"created_at":"2024-12-22T21:14:42.072Z","updated_at":"2026-03-18T01:02:45.412Z","avatar_url":"https://github.com/mlampros.png","language":"R","funding_links":["https://github.com/sponsors/mlampros","https://www.buymeacoffee.com/VY0x8snyh"],"categories":[],"sub_categories":[],"readme":"\n[![tic](https://github.com/mlampros/nmslibR/workflows/tic/badge.svg?branch=master)](https://github.com/mlampros/nmslibR/actions)\n[![codecov.io](https://codecov.io/github/mlampros/nmslibR/coverage.svg?branch=master)](https://codecov.io/github/mlampros/nmslibR?branch=master)\n[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/nmslibR)](http://cran.r-project.org/package=nmslibR)\n[![Downloads](http://cranlogs.r-pkg.org/badges/grand-total/nmslibR?color=blue)](http://www.r-pkg.org/pkg/nmslibR)\n\u003ca href=\"https://www.buymeacoffee.com/VY0x8snyh\" target=\"_blank\"\u003e\u003cimg src=\"https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png\" alt=\"Buy Me A Coffee\" height=\"21px\" \u003e\u003c/a\u003e\n[![Dependencies](https://tinyverse.netlify.com/badge/nmslibR)](https://cran.r-project.org/package=nmslibR)\n\n\n## nmslibR (Non Metric Space Library in R)\n\u003cbr\u003e\n\n\nThe **nmslibR** package is a wrapper of the [Non-Metric Space Library (NMSLIB)](https://github.com/nmslib/nmslib) *python* package. More details on the functionality of the *nmslibR* package can be found in the [blog-post](http://mlampros.github.io/2018/02/27/the_nmslibR_package/) and in the package Documentation.\n\n\u003cbr\u003e\n\n\n**Reference:**\n\nhttps://github.com/nmslib/nmslib\n\nhttps://github.com/nmslib/nmslib/blob/master/manual/latex/manual.pdf\n\n\n\u003cbr\u003e\n\n### **System Requirements**\n\n\u003cbr\u003e\n\n* Python (\u003e= 2.7)\n\n\n\u003cbr\u003e\n\nAll modules should be installed in the default python configuration (the configuration that the R-session displays as default), otherwise errors will occur during the *nmslibR* package installation (**reticulate::py_discover_config()** might be useful here). \n\n\u003cbr\u003e\n\nThe installation notes for *Linux, Macintosh, Windows* are based on *Python 3*.\n\n\u003cbr\u003e\n\n#### **Debian/Ubuntu**\n\n\u003cbr\u003e\n\nInstallation of the system requirements,\n\n\u003cbr\u003e\n\n```R\n\nsudo apt-get install python3-pip\n\nsudo pip3 install --upgrade setuptools\n\nsudo pip3 install -U numpy\n\nsudo pip3 install --upgrade scipy\n\nsudo apt-get install libboost-all-dev libgsl0-dev libeigen3-dev\n\nsudo apt-get install cmake\n\npip3 install --upgrade pybind11\n\nsudo pip3 install nmslib\n\n```\n\n\u003cbr\u003e\n\n#### **Fedora**\n\n\u003cbr\u003e\n\nInstallation of the system requirements,\n\n\u003cbr\u003e\n\n```R\n\ndnf install python3-pip\n\nsudo pip3 install --upgrade setuptools\n\nsudo pip3 install -U numpy\n\nsudo pip3 install --upgrade scipy\n\nyum install python3-devel\n\nyum install boost-devel\n\nyum install gsl-devel\n\nyum install eigen3-devel\n\npip3 install --upgrade pybind11\n\nsudo pip3 install nmslib\n\n```\n\n\u003cbr\u003e\n\n#### **Macintosh OSX**\n\n\u003cbr\u003e\n\nUpgrade python to version 3 using, \n\n\n```R\n\nbrew upgrade python\n\n```\n\n\u003cbr\u003e\n\nInstall the requirements,\n\n\u003cbr\u003e\n\n```R\n\nsudo pip3 install --upgrade pip setuptools wheel\n\nsudo pip3 install -U numpy\n\nsudo pip3 install --upgrade scipy\n\nbrew install boost\n\nbrew install eigen\n\nbrew install gsl\n\nbrew install cmake\n\nbrew link --overwrite cmake\n\npip3 install --upgrade pybind11\n\nsudo pip3 install nmslib\n\n```\n\u003cbr\u003e\n\n\nAfter a successful installation of the requirements the user should open an R session and give the following *reticulate* command to change to the relevant (brew-python) directory (otherwise the *nmslibR* package won't work properly),\n\n\u003cbr\u003e\n\n```R\n\nreticulate::use_python('/usr/local/bin/python3')\n\n\n```\n\n\u003cbr\u003e\n\nand then,\n\n\u003cbr\u003e\n\n\n```R\n\nreticulate::py_discover_config()\n\n\n```\n\n\u003cbr\u003e\n\nto validate that a user is in the python version where *nmslibR* is installed. \n\n\u003cbr\u003e\u003cbr\u003e\n\n\n\n#### **Windows OS** (the instructions were tested with the version 1.0.0 of the R package, thus use with caution)\n\n\u003cbr\u003e\n\nFirst download of [get-pip.py](https://bootstrap.pypa.io/get-pip.py) for windows\n\n\u003cbr\u003e\n\nUpdate the Environment variables ( Control Panel \u003e\u003e System and Security \u003e\u003e System \u003e\u003e Advanced system settings \u003e\u003e Environment variables \u003e\u003e System variables \u003e\u003e Path \u003e\u003e Edit ) by adding ( for instance in case of python 2.7 ),\n\n\u003cbr\u003e\n\n```R\n\nC:\\Python36;C:\\Python36\\Scripts\n\n\n```\n\n\u003cbr\u003e\n\nInstall the [Build Tools for Visual Studio](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2017)\n\n\u003cbr\u003e\n\nOpen the Command prompt (console) and install / upgrade the system requirements,\n\n\u003cbr\u003e\n\n```R\n\npip3 install --upgrade pip setuptools wheel\n\npip3 install -U numpy\n\npip3 install --upgrade scipy\n\n```\n\n\u003cbr\u003e\n\n**Installation of cmake**\n\n\u003cbr\u003e\n\nFirst download cmake for Windows, [win64-x64 Installer](https://cmake.org/download/).\nOnce the file is downloaded run the **.exe** file and during installation make sure to **add CMake to the system PATH for all users**.\n\n\u003cbr\u003e\n\n\nThen install the *nmslib* library,\n\n\u003cbr\u003e\n\n```R\n\npip3 install --upgrade pybind11\n\npip3 install nmslib\n\n```\n\n\u003cbr\u003e\n\n\n\n### **Installation of the nmslibR package**\n\n\u003cbr\u003e\n\nTo install the package from CRAN use, \n\n\u003cbr\u003e\n\n```R\n\ninstall.packages('nmslibR')\n\n\n```\n\u003cbr\u003e\n\nand to download the latest version from Github use the *install_github* function of the *remotes* package,\n\u003cbr\u003e\u003cbr\u003e\n\n```R\n\nremotes::install_github(repo = 'mlampros/nmslibR')\n\n```\n\u003cbr\u003e\nUse the following link to report bugs/issues,\n\u003cbr\u003e\u003cbr\u003e\n\n[https://github.com/mlampros/nmslibR/issues](https://github.com/mlampros/nmslibR/issues)\n\n\u003cbr\u003e\n\n### **Citation:**\n\nIf you use the code of this repository in your paper or research please cite both **nmslibR** and the **original articles / software** [https://CRAN.R-project.org/package=nmslibR/citation.html](https://CRAN.R-project.org/package=nmslibR/citation.html):\n\n\u003cbr\u003e\n\n```R\n@Manual{,\n  title = {{nmslibR}: Non Metric Space (Approximate) Library in R},\n  author = {Lampros Mouselimis},\n  year = {2021},\n  note = {R package version 1.0.7},\n  url = {https://CRAN.R-project.org/package=nmslibR},\n}\n```\n\n\u003cbr\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlampros%2Fnmslibr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmlampros%2Fnmslibr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlampros%2Fnmslibr/lists"}