litstudy icon indicating copy to clipboard operation
litstudy copied to clipboard

bug fix: restricting scipy version

Open eriktks opened this issue 1 year ago • 2 comments

Running the notebook results in the error message:

cannot import name 'triu' from 'scipy.linalg'

This PR restricts the version of scipy to avoid the import error message

See: https://stackoverflow.com/questions/78279136/importerror-cannot-import-name-triu-from-scipy-linalg-gensim

eriktks avatar Apr 22 '24 16:04 eriktks

Thanks for the contribution!

It seems that it still gives the same error: ImportError: cannot import name 'triu' from 'scipy.linalg'. The cause seem to be from gensim. Maybe we should limit the version of gensim instead?

stijnh avatar Apr 23 '24 11:04 stijnh

Thanks for the contribution!

It seems that it still gives the same error: ImportError: cannot import name 'triu' from 'scipy.linalg'. The cause seem to be from gensim. Maybe we should limit the version of gensim instead?

I hit the same issue. It seems that gensim is not constraining their use of scipy. The functionality itself is said to have been moved to numpy:

  • https://numpy.org/doc/stable/reference/generated/numpy.triu.html
  • https://docs.scipy.org/doc/scipy-1.12.0/reference/generated/scipy.linalg.triu.html#scipy.linalg.triu

The scipy.linalg.triu is marked as deprecated in scipy.

Kaszanas avatar May 23 '24 12:05 Kaszanas