Home:ALL Converter>importing gensim in mac

importing gensim in mac

Ask Time:2015-12-01T21:15:05         Author:user5289027

Json Formatter

I'm having a problem when trying to import gensim in python. When typing:

import gensim

I got the following error:

Traceback (most recent call last): File "", line 1, in File "/Library/Python/2.7/site-packages/gensim/init.py", line 6, in from gensim import parsing, matutils, interfaces, corpora, models, similarities, summarization ImportError: cannot import name parsing

Also, when I view "init.py" it contains only the following lines:

bring model classes directly into package namespace, to save some typing

from .summarizer import summarize, summarize_corpus

from .keywords import keywords

Any idea on how to solve this problem is highly appreciated.

I'm using: MAC 10.10.5 and Python 2.7

Thank you

Author:user5289027,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/34021351/importing-gensim-in-mac
travelingbones :

I had a similar error. I used pip to update itself, then uninstall, reinstall, and update gensim. I also pip installed Theano (b/c mine was unable to import something related to it). \n\npip install --upgrade pip\npip uninstall gensim\npip install --upgrade gensim \npip install Theano \n\n\nThen I needed to close and restart a new terminal python shell, and it worked! \n\nOne other note-- if you look at the error message, you can see the filepath to the .py files in the /gensim folder and the line in that .py file causing the error. Then you can try to manually run each import that is causing an error (after cd-ing to the appropriate folder). This might help you find what packages are causing the problem. ",
2016-06-30T16:24:07
TheShadlest :

The file \"init.py\" is trying to import things from gensim.py. It's unable to import one of the classes. As you can see in the last line of your error, it says it was unable to import name parsing. I suggest:\n-if you downloaded the package from the internet(I'm quite new to python, and still don't know all the downloadable content):\n-Search the website for what this package means and try redownloading it (re-install the module). Also, try looking after if the versions are compatible. If this package have many versions, find the appropriate version according to your python version.\n\nWhat happens is that part of the package is missing.",
2015-12-01T15:01:10
yy