You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Gensim Newsgroup.ipynb generates an error today when you run pip install -r requirements.txt that can be resolved by using scipy<1.13 to make existing code work.
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[4], line 5
3 import string
4 import funcy as fp
----> 5 from gensim import models
6 from gensim.corpora import Dictionary, MmCorpus
7 import nltk
File ~/.virtualenvs/venv-pyLDAvis/lib/python3.11/site-packages/gensim/__init__.py:11
7 __version__ = '4.3.2'
9 import logging
---> 11 from gensim import parsing, corpora, matutils, interfaces, models, similarities, utils # noqa:F401
14 logger = logging.getLogger('gensim')
15 if not logger.handlers: # To ensure reload() doesn't add another one
File ~/.virtualenvs/venv-pyLDAvis/lib/python3.11/site-packages/gensim/corpora/__init__.py:6
1 """
2 This package contains implementations of various streaming corpus I/O format.
3 """
5 # bring corpus classes directly into package namespace, to save some typing
----> 6 from .indexedcorpus import IndexedCorpus # noqa:F401 must appear before the other classes
8 from .mmcorpus import MmCorpus # noqa:F401
9 from .bleicorpus import BleiCorpus # noqa:F401
File ~/.virtualenvs/venv-pyLDAvis/lib/python3.11/site-packages/gensim/corpora/indexedcorpus.py:14
10 import logging
12 import numpy
---> 14 from gensim import interfaces, utils
16 logger = logging.getLogger(__name__)
19 class IndexedCorpus(interfaces.CorpusABC):
File ~/.virtualenvs/venv-pyLDAvis/lib/python3.11/site-packages/gensim/interfaces.py:19
7 """Basic interfaces used across the whole Gensim package.
8
9 These interfaces are used for building corpora, model transformation and similarity queries.
(...)
14
15 """
17 import logging
---> 19 from gensim import utils, matutils
22 logger = logging.getLogger(__name__)
25 class CorpusABC(utils.SaveLoad):
File ~/.virtualenvs/venv-pyLDAvis/lib/python3.11/site-packages/gensim/matutils.py:20
18 import scipy.sparse
19 from scipy.stats import entropy
---> 20 from scipy.linalg import get_blas_funcs, triu
21 from scipy.linalg.lapack import get_lapack_funcs
22 from scipy.special import psi # gamma function utils
ImportError: cannot import name 'triu' from 'scipy.linalg' (/Users/marksusol/.virtualenvs/venv-pyLDAvis/lib/python3.11/site-packages/scipy/linalg/__init__.py)
Gensim Newsgroup.ipynb
generates an error today when you runpip install -r requirements.txt
that can be resolved by usingscipy<1.13
to make existing code work.ref: https://stackoverflow.com/questions/78279136/importerror-cannot-import-name-triu-from-scipy-linalg-gensim
piskvorky/gensim#3525
The text was updated successfully, but these errors were encountered: