cisnlp / simalign

Obtain Word Alignments using Pretrained Language Models (e.g., mBERT)
MIT License
347 stars 47 forks source link

The install_requires may need update #37

Open imliuruiqi opened 1 year ago

imliuruiqi commented 1 year ago

I noticed that install_requires specific version of networkx: networkx==2.4
howerver networkx2.4 is not compatible with the latest numpy1.24.0, which leads to an AttributeError: module 'numpy' has no attribute 'int' when trying to import SentenceAligner

Possible Fix we better find a newer version of networkx, but we can also use lower numpy-1.23.4 as an workaround.

LahiLuk commented 1 year ago

I encountered the same numpy error. Upgrading networkx to the new 3.0 release after installing simalign solves the issue, thus there is no need to downgrade numpy.