Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 0 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,38 +27,6 @@ Take a look below in the "Setting up a virtual environment" section if you need
Additionally, scispacy uses modern features of Python and as such is only available for **Python 3.6 or greater**.


### Installation note: nmslib
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!

| | Windows 11 | Windows Subsystem for Linux | Mac M1 | Mac M2 | Mac M3 | Mac M4 | Intel Mac |
|---------------|------------|----------------------------|---------|---------|---------|---------|-----------|
| Python 3.8 | ✅ | ✅ | 💻 | ❓ | ❓ | ❌🔨 | ❓ |
| Python 3.9 | ❌🐍 | ✅ | 💻 | ❌🔨 | ❓ | ❌🔨 | ❓ |
| Python 3.10 | ❌🐍 | ✅ | ❓ | ❓ | ❓ | ❌🔨 | ✅ |
| Python 3.11 | ❌🐍 | ❌🐍 | ❓ | ❓ | ❓ | ❌🔨 | ❌ |
| Python 3.12 | ❌🐍 | ❌🐍🧠 | ❓ | ❓ | ❓ | ❌🧠 | ❓ |


✅ = works normally with pip install of scispacy

❌ = does not work normally with pip install of scispacy

🐍 = can be installed with `mamba install nmslib`

💻 = can be installed with `CFLAGS="-mavx -DWARN(a)=(a)" pip install nmslib`

🧠 = can be installed with `pip install nmslib-metabrainz`

🔨 = can be installed with `conda install -c conda-forge nmslib`

❓ = unconfirmed

Other methods mentioned in GitHub issues, but unconfirmed what versions they work for:
- `CFLAGS="-mavx -DWARN(a)=(a)" pip install nmslib`
- `pip install --no-binary :all: nmslib`
- `pip install "nmslib @ git+https://github.com/nmslib/nmslib.git/#subdirectory=python_bindings"`
- `pip install --upgrade pybind11` + `pip install --verbose 'nmslib @ git+https://github.com/nmslib/nmslib.git#egg=nmslib&subdirectory=python_bindings'`

#### Setting up a virtual environment

[Mamba](https://mamba.readthedocs.io/en/latest/) can be used set up a virtual environment with the
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ dependencies = [
# numpy needs to be constrained until spacy and nmslib are rebuilt
"numpy<2.0",
"joblib",
"nmslib>=1.7.3.6; python_version < '3.10'",
"nmslib-metabrainz==2.1.3; python_version >= '3.10'",
"nmslib>=2.1.2",
"scikit-learn>=0.20.3",
"pysbd",
]
Expand Down
5 changes: 1 addition & 4 deletions requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ conllu

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

# Required for testing.
Expand Down