Gensim import in python doesnt work after installatoin with pip

243 views
Skip to first unread message

Nick Albrecht

unread,
Aug 1, 2019, 5:18:28 PM8/1/19
to Gensim
Hello,

after doing: 

from gensim.models import Word2Vec

i get the error:


Traceback (most recent call last):
  File "c:/Users/Administrator/Documents/GitHub/contract-criteria-identifier-on-aws/schnelltest.py", line 1, in <module>
    from gensim.models import Word2Vec
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gensim\__init__.py", line 5, in <module>
    from gensim import parsing, corpora, matutils, interfaces, models, similarities, summarization, utils  # noqa:F401
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gensim\parsing\__init__.py", line 4, in <module>
    from .preprocessing import (remove_stopwords, strip_punctuation, strip_punctuation2,  # noqa:F401
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gensim\parsing\preprocessing.py", line 42, in
<module>
    from gensim import utils
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gensim\utils.py", line 40, in <module>
    import scipy.sparse
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\lib\site-packages\scipy\sparse\__init__.py", line 230, in <module>
    from .csr import *
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\lib\site-packages\scipy\sparse\csr.py", line 13, in <module>
    from ._sparsetools import (csr_tocsc, csr_tobsr, csr_count_blocks,
ImportError: DLL load failed: The specified module could not be found.



I already reinstalled pip3, numpy, scipy and the other dependencies. I also dont think its an PATH issue.

Please help me run gensim.

I run windpws server.

Thank You

Greetings Nick 

Gordon Mohr

unread,
Aug 1, 2019, 6:21:46 PM8/1/19
to Gensim
As per the troubleshooting help offered on StackOverflow (<https://stackoverflow.com/questions/57298877/how-to-install-gensim-and-run-package-in-python>), to have any idea what's gone wrong with your `scipy` installation, your question would need to include more precise details about exactly what you've typed at each step, and which output/errors came in response to each step. (Using a conda installation and environment in the correct way usually gets `scipy` and its prerequisites properly installed, even on Windows, so showing details of how you installed `conda`. how you `conda install` other packages, and how you named/activated your conda-environment would be especially helpful.)

- Gordon
Reply all
Reply to author
Forward
0 new messages