0

I am using windows 7. I have installed python 2.7 and gensim using (pip install gensim). When I try to import gensim in a python console, I get the following error :

C:\HOMEWARE\Anaconda\lib\site-packages\gensim\utils.py:860: UserWarning: detected Windows; aliasing chunkize to chunkize_serial
  warnings.warn("detected Windows; aliasing chunkize to chunkize_serial")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\HOMEWARE\Anaconda\lib\site-packages\gensim\__init__.py", line 6, in <module>
    from gensim import parsing, matutils, interfaces, corpora, models, similarities, summarization
  File "C:\HOMEWARE\Anaconda\lib\site-packages\gensim\matutils.py", line 21, in <module>
    from scipy.stats import entropy
  File "C:\HOMEWARE\Anaconda\lib\site-packages\scipy\stats\__init__.py", line 348, in <module>
    from .stats import *
  File "C:\HOMEWARE\Anaconda\lib\site-packages\scipy\stats\stats.py", line 175, in <module>
    import scipy.special as special
  File "C:\HOMEWARE\Anaconda\lib\site-packages\scipy\special\__init__.py", line 640, in <module>
    from ._ufuncs import *
ImportError: DLL load failed: The specified module could not be found.

I have seen similar error on stackoverflow here and here but it doesn't seem to do the trick for me.

Thank you for your help !

tchatcha
  • 1
  • 1
  • 2

1 Answers1

0

I ran into a similar problem today. After scouring through different solutions on StackOverflow and other websites, none of which worked, I ended up looking at my error stack and realized that even though the error was being shown from SciPy's side, it was actually NumPy which was causing this issue. The following are the steps which worked for me.

  • pip uninstall scipy
  • pip uninstall numpy
  • Download numpy+mkl from this link
  • Download scipy from this link

Now try importing gensim. Cheers !

Atif Hassan
  • 932
  • 6
  • 12