Closed mezarque closed 1 month ago
Wow, thank you! This solution seems to work for me on both Windows and Linux with python 3.11, which hasn't previously worked. Thank you for sharing! I will respond to some other issues and see if it works for others and then update the installation instructions.
I just added a support matrix based on what im able to test or glean from previous github issues, so going to go ahead and close this issue. Thanks again for the suggestion!
I've been trying to import EntityLinker but running into an unusual issue where the kernel hangs for a very long time (so far I've let it run up to 93 minutes) without dying or producing an error.
I know there are some previous issues that were related to
nmslib
(e.g. #365, #372, #437, #446). These seemed to result in azsh: illegal hardware instruction
error, which I don't seem to be encountering.I eventually figured out how to resolve this, but wanted to share my solution, in case anyone else runs into the same problem.
Hardware / OS
I'm using a 2021 MacBook Pro with an Apple M1 Pro chip, running macOS Ventura 13.1.
Steps
conda create -n scispacy python=3.9
. I'm usingconda 24.7.1
.conda activate scispacy
pip install scispacy
pip install https://s3-us-west-2.amazonaws.com/ai2-s2-scispacy/releases/v0.5.4/en_core_sci_sm-0.5.4.tar.gz
python
Run the following code:
Receive warning:
Continue with
No problems.
Run the following code:
No problems.
No problems.
Kernel hangs for a very long time without dying.
Attempts
nmslib
withpip uninstall nmslib
and reinstalling with each of the following strategies:pip install --no-binary :all: nmslib
(suggested here)CFLAGS="-mavx -DWARN(a)=(a)" pip install nmslib
(suggested here)Solution
Installing
nmslib
usingconda
(I usedmamba
) appeared to solve the issue.This installed
nmslib 2.1.1
, which appears to be a newer version than what is specified inrequirements.in
andsetup.py
(nmslib>=1.7.3.6
). Might upgrading the version there be a good idea? I'm not sure what other issues that would introduce.