I installed gensim, Python library.
I executed the command
Import gensim
It executed without any error.
Then I tried to import test from gensim using the command
from gensim import test
and it showed the following error
Traceback (most recent call last):
File "", line 1, in
from gensim import test
ImportError: cannot import name 'test'
Python site-packages had gensim folder in that.
Any help would be highly appreciated.
Cyrbil :
As it says: cannot import name 'test'\nThat means that test is not in gensim package.\n\nYou can see package's modules with:\n\nimport gensim\nprint(gensim.__all__) # when package provide a __all__\n\n\nor\n\nimport gensim\nimport pkgutil\nmodules = pkgutil.iter_modules(gensim.__path__)\nfor module in modules:\n print(module[1])\n\n\nEdit:\n\n\n How can I verify gensim installation ?\n\n\ntry:\n import gensim\nexcept NameError:\n print('gensim is not installed')\n\n\nSide note: if you have a file or package named gensim, this will ne imported instead of the real package.",
2016-03-14T11:20:31