from gensim import utils

886 views
Skip to first unread message

khaled a

unread,
Oct 9, 2015, 8:18:15 PM10/9/15
to gensim
Hey I am ruining into this problem. I am using Visual Studio 2015 windows 8.1 64bits

>>> from gensim import interfaces
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\mig-admin\Anaconda\lib\site-packages\gensim-0.12.2-py2.7-win-amd64.egg\gensim\__init__.py", line 6, in <module>
    from gensim import parsing, matutils, interfaces, corpora, models, similarities, summarization
  File "C:\Users\mig-admin\Anaconda\lib\site-packages\gensim-0.12.2-py2.7-win-amd64.egg\gensim\matutils.py", line 17, in <module>
    from gensim import utils
ImportError: cannot import name utils

Please help me 

Radim Řehůřek

unread,
Oct 10, 2015, 9:57:26 AM10/10/15
to gensim
Hello Khaled,

what directory are you running the python shell from?

And what is the exact error when you open a new python shell, and type `from gensim import utils`?

-rr
Message has been deleted
Message has been deleted

khaled a

unread,
Oct 10, 2015, 12:09:23 PM10/10/15
to gensim

Hey Radim, Thank you very your fast reply. I have explained below all the problem I think that are associated with my issue.  


I first installed anacoda. Then I run python from visual studio 2015 on windows 7 64bit
using 

scipy==0.7.0
numpy==1.10.0

1) When I import gensim after importing scipy and numpy the error messges is as follows

>>> import scipy
>>> import numpy
>>> import gensim
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\mig-admin\Anaconda\lib\site-packages\gensim\__init__.py", line 6, in <module>
    from gensim import parsing, matutils, interfaces, corpora, models, similarities, summarization
  File "C:\Users\mig-admin\Anaconda\lib\site-packages\gensim\matutils.py", line 17, in <module>
    from gensim import utils
ImportError: cannot import name utils


2) but when I import gensim directly without importing scipy and numpy I get this message 

>>> import gensim
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\mig-admin\Anaconda\lib\site-packages\gensim\__init__.py", line 6, in <module>
    from gensim import parsing, matutils, interfaces, corpora, models, similarities, summarization
  File "C:\Users\mig-admin\Anaconda\lib\site-packages\gensim\matutils.py", line 21, in <module>
    import scipy.linalg
  File "C:\Users\mig-admin\Anaconda\lib\site-packages\scipy\linalg\__init__.py", line 161, in <module>
    from .misc import *
  File "C:\Users\mig-admin\Anaconda\lib\site-packages\scipy\linalg\misc.py", line 5, in <module>
    from . import blas
  File "C:\Users\mig-admin\Anaconda\lib\site-packages\scipy\linalg\blas.py", line 155, in <module>
    from scipy.linalg import _fblas
ImportError: DLL load failed: The specified module could not be found.

3) I would like to mention that when I try to update the scipy to version 0.14.0. I get this error


        config = setup_module.configuration(*args)
      File "scipy\integrate\setup.py", line 12, in configuration
        blas_opt = get_info('blas_opt',notfound_action=2)
      File "C:\Users\mig-admin\Anaconda\lib\site-packages\numpy\distutils\sys
        return cl().get_info(notfound_action)
      File "C:\Users\mig-admin\Anaconda\lib\site-packages\numpy\distutils\sys
        raise self.notfounderror(self.notfounderror.__doc__)
    numpy.distutils.system_info.BlasNotFoundError:
        Blas (http://www.netlib.org/blas/) libraries not found.
        Directories to search for the libraries can be specified in the
        numpy/distutils/site.cfg file (section [blas]) or by setting
        the BLAS environment variable.

Radim Řehůřek

unread,
Oct 12, 2015, 12:52:34 AM10/12/15
to gensim
Hello Khaled,

what version of gensim did you install? And how did you install it?

In any case, this error looks unrelated to gensim. Probably best to ask at your distribution mailing list (anaconda), or perhaps at the scipy mailing list.

Best,
Radim
Reply all
Reply to author
Forward
0 new messages