Skip to content

Can't import gensim library - Python 3.8.5 + numpy 1.20.2 #3097

@norbertgieruc

Description

@norbertgieruc

Hi,

I was trying to run script that I created some time ago on Python 3.6.5 and it seems to don't work anymore. I can't import the library. Upgrading numpy didn't help. Can I ask for a solution to this problem?



> from gensim import corpora
> Traceback (most recent call last):
> 
>   File "<ipython-input-5-0b009fd6379b>", line 1, in <module>
>     from gensim import corpora
> 
>   File "C:\Users\user\Anaconda3\lib\site-packages\gensim\__init__.py", line 11, in <module>
>     from gensim import parsing, corpora, matutils, interfaces, models, similarities, utils  # noqa:F401
> 
>   File "C:\Users\user\Anaconda3\lib\site-packages\gensim\corpora\__init__.py", line 6, in <module>
>     from .indexedcorpus import IndexedCorpus  # noqa:F401 must appear before the other classes
> 
>   File "C:\Users\user\Anaconda3\lib\site-packages\gensim\corpora\indexedcorpus.py", line 14, in <module>
>     from gensim import interfaces, utils
> 
>   File "C:\Users\user\Anaconda3\lib\site-packages\gensim\interfaces.py", line 19, in <module>
>     from gensim import utils, matutils
> 
>   File "C:\Users\user\Anaconda3\lib\site-packages\gensim\matutils.py", line 1024, in <module>
>     from gensim._matutils import logsumexp, mean_absolute_difference, dirichlet_expectation
> 
>   File "gensim\_matutils.pyx", line 1, in init gensim._matutils
> 
> ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject
> 

Python 3.8.5
Numpy 1.20.2

Best regards,
Norbert

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue described a bugimpact HIGHShow-stopper for affected usersreach HIGHAffects most or all Gensim users

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions