I am having trouble getting PyDev on Eclipse to recognize installed modules (gensim), which work fine in IDLE. I am using Windows Vista, 32-bit. Python 2.7.
I have found this question asked: here, here, here, and here.
The recommended solution is to go to preferences > pydev > interpreter - python, and remove and re-add (w/ Auto Config) the python interpreter. I have done this, and have restarted Eclipse. In PYTHONPATH
, C:\Python27\lib\site-packages\gensim-0.8.0-py2.7.egg
, appears, but I still run into the import error. My code is:
from gensim import corpora, models, similarities
And this yields:
Traceback (most recent call last):
File "C:\Users\Jpan\Documents\workspace\FirstProject\src\gensim.py", line 1, in <module>
from gensim import corpora, models, similarities
File "C:\Users\Jpan\Documents\workspace\FirstProject\src\gensim.py", line 1, in <module>
from gensim import corpora, models, similarities
ImportError: cannot import name corpora
Another recommended solution is to manually add the folder by clicking "New Folder" in the bottom part of the interpreter - python screen and navigating to the location where gensim installed. I have also done this, and added C:\Python27\lib\site-packages\gensim-0.8.0-py2.7.egg\gensim
, which has all the necessary \__init__.py
files. But, I still get the ImportError
.
Any suggestions for what else I could try?