MedCAT icon indicating copy to clipboard operation
MedCAT copied to clipboard

Upgrade spacy dependency

Open louni-g opened this issue 3 years ago • 1 comments

Hi! Is there a specific reason why the spacy version used by MedCAT is pinned to <3.1.4 ? We use MedCAT and find ourselves a bit stuck because of this requirement, do you plan on releasing a version of MedCAT that works with higher versions of spacy any time soon ?

louni-g avatar Aug 30 '22 15:08 louni-g

Hi @louni-g, it should not matter if you upgrade spacy - all will work normally, even if PIP complains about version requirements. The reason for freezing the versions is that we distribute modelpacks that contain spacy models inside, and spacy does not have the best backward compatibility - so if we allow newer spacy versions older modelpacks could stop working. We are working on a solution and if nothing a new version of MedCAT will be released that supports the most recent version of spacy.

w-is-h avatar Aug 30 '22 21:08 w-is-h

When you add MedCat as dependency with a difference version of spaCy as provided in MedCat pip has issues. Even in legacy mode, it won't install the package that depends on MedCat and spaCy complaining about version conflicts.

My workaround until a new version is released is simply to remove the spaCy dependency in the setup.py and specify the version I need in the top level package that depends on them both.

For anyone else that might be in my situation and need this, I have forked this repo, created a branch and then removed the spaCy dependency as mentioned.

Here's the fork, or you can simply install it with:

pip install zensols.medcat

plandes avatar Oct 03 '22 22:10 plandes

Looks like the spaCy version has been relaxed since release 1.7.0. Feel free to open a new issue regarding backward compatibility.

baixiac avatar Mar 13 '23 12:03 baixiac