Skip to content

Commit eacccd4

Browse files
authored
Merge pull request #559 from allenai/nmslib-proper
Go back to official nmslib
2 parents 7704384 + 7c27733 commit eacccd4

3 files changed

Lines changed: 2 additions & 38 deletions

File tree

README.md

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -27,38 +27,6 @@ Take a look below in the "Setting up a virtual environment" section if you need
2727
Additionally, scispacy uses modern features of Python and as such is only available for **Python 3.6 or greater**.
2828

2929

30-
### Installation note: nmslib
31-
Over the years, installing nmslib has becomes quite difficult. There are a number of GitHub issues on scispaCy and the nmslib repo itself about this. This matrix is an attempt to help users install nmslib in whatever environment they have. I don't have access to every type of environment, so if you are able to test something out, please open an issue or pull request!
32-
33-
| | Windows 11 | Windows Subsystem for Linux | Mac M1 | Mac M2 | Mac M3 | Mac M4 | Intel Mac |
34-
|---------------|------------|----------------------------|---------|---------|---------|---------|-----------|
35-
| Python 3.8 ||| 💻 ||| ❌🔨 ||
36-
| Python 3.9 | ❌🐍 || 💻 | ❌🔨 || ❌🔨 ||
37-
| Python 3.10 | ❌🐍 ||||| ❌🔨 ||
38-
| Python 3.11 | ❌🐍 | ❌🐍 |||| ❌🔨 ||
39-
| Python 3.12 | ❌🐍 | ❌🐍🧠 |||| ❌🧠 ||
40-
41-
42-
✅ = works normally with pip install of scispacy
43-
44-
❌ = does not work normally with pip install of scispacy
45-
46-
🐍 = can be installed with `mamba install nmslib`
47-
48-
💻 = can be installed with `CFLAGS="-mavx -DWARN(a)=(a)" pip install nmslib`
49-
50-
🧠 = can be installed with `pip install nmslib-metabrainz`
51-
52-
🔨 = can be installed with `conda install -c conda-forge nmslib`
53-
54-
❓ = unconfirmed
55-
56-
Other methods mentioned in GitHub issues, but unconfirmed what versions they work for:
57-
- `CFLAGS="-mavx -DWARN(a)=(a)" pip install nmslib`
58-
- `pip install --no-binary :all: nmslib`
59-
- `pip install "nmslib @ git+https://github.com/nmslib/nmslib.git/#subdirectory=python_bindings"`
60-
- `pip install --upgrade pybind11` + `pip install --verbose 'nmslib @ git+https://github.com/nmslib/nmslib.git#egg=nmslib&subdirectory=python_bindings'`
61-
6230
#### Setting up a virtual environment
6331

6432
[Mamba](https://mamba.readthedocs.io/en/latest/) can be used set up a virtual environment with the

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ dependencies = [
4545
# numpy needs to be constrained until spacy and nmslib are rebuilt
4646
"numpy<2.0",
4747
"joblib",
48-
"nmslib>=1.7.3.6; python_version < '3.10'",
49-
"nmslib-metabrainz==2.1.3; python_version >= '3.10'",
48+
"nmslib>=2.1.2",
5049
"scikit-learn>=0.20.3",
5150
"pysbd",
5251
]

requirements.in

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@ conllu
1111

1212
# Candidate generation and entity linking
1313
joblib
14-
nmslib>=1.7.3.6; python_version < '3.11'
15-
# Use the metabrainz fork until nmslib supports installing on Python 3.11+
16-
# https://github.com/nmslib/nmslib/issues/555
17-
nmslib-metabrainz==2.1.3; python_version >= '3.11'
14+
nmslib>=2.1.2
1815
scikit-learn>=0.20.3
1916

2017
# Required for testing.

0 commit comments

Comments
 (0)