I don’t know what I could do, but Pycharm now decides to say that he doesn’t know things like TaggedDocument or Doc2Vec , although it worked an hour ago.

This is my project structure:

I don’t remember to do anything that could cause this, so please tell me how I can fix it.
I do not understand that in the "External Libraries in the Project Explorer" section, I really see that gensim.models.doc2vec really present. So why is PyCharm still complaining here?

Update
I noticed the following: In the gensim.models package gensim.models I see that the doc2vec.py file doc2vec.py not marked as a Python file! Note that there is also syntax highlighting on the right side! It is strange that all other files in this directory are indeed recognized correctly!

These are file permissions in /usr/local/lib/python2.7/dist-packages/gensim/models
drwxr-sr-x 3 root staff 4096 Oct 23 2015 . drwxr-sr-x 9 root staff 4096 Oct 23 2015 .. -rw-r--r-- 1 root staff 570651 Oct 23 2015 doc2vec_inner.c -rw-r--r-- 1 root staff 26872 Oct 23 2015 doc2vec_inner.pyx -rwxr-xr-x 1 root staff 473658 Oct 23 2015 doc2vec_inner.so -rw-r--r-- 1 root staff 37304 Oct 23 2015 doc2vec.py -rw-r--r-- 1 root staff 35822 Oct 23 2015 doc2vec.pyc -rw-r--r-- 1 root staff 23000 Oct 23 2015 hdpmodel.py -rw-r--r-- 1 root staff 21250 Oct 23 2015 hdpmodel.pyc -rw-r--r-- 1 root staff 1920 Oct 23 2015 __init__.py -rw-r--r-- 1 root staff 2697 Oct 23 2015 __init__.pyc -rw-r--r-- 1 root staff 6724 Oct 23 2015 lda_dispatcher.py -rw-r--r-- 1 root staff 7451 Oct 23 2015 lda_dispatcher.pyc -rw-r--r-- 1 root staff 37778 Oct 23 2015 ldamodel.py -rw-r--r-- 1 root staff 32106 Oct 23 2015 ldamodel.pyc -rw-r--r-- 1 root staff 12478 Oct 23 2015 ldamulticore.py -rw-r--r-- 1 root staff 11924 Oct 23 2015 ldamulticore.pyc -rw-r--r-- 1 root staff 4079 Oct 23 2015 lda_worker.py -rw-r--r-- 1 root staff 5067 Oct 23 2015 lda_worker.pyc -rw-r--r-- 1 root staff 4239 Oct 23 2015 logentropy_model.py -rw-r--r-- 1 root staff 4452 Oct 23 2015 logentropy_model.pyc -rw-r--r-- 1 root staff 7100 Oct 23 2015 lsi_dispatcher.py -rw-r--r-- 1 root staff 7518 Oct 23 2015 lsi_dispatcher.pyc -rw-r--r-- 1 root staff 34968 Oct 23 2015 lsimodel.py -rw-r--r-- 1 root staff 27309 Oct 23 2015 lsimodel.pyc -rw-r--r-- 1 root staff 3793 Oct 23 2015 lsi_worker.py -rw-r--r-- 1 root staff 4848 Oct 23 2015 lsi_worker.pyc -rw-r--r-- 1 root staff 10461 Oct 23 2015 phrases.py -rw-r--r-- 1 root staff 9505 Oct 23 2015 phrases.pyc -rw-r--r-- 1 root staff 3734 Oct 23 2015 rpmodel.py -rw-r--r-- 1 root staff 4002 Oct 23 2015 rpmodel.pyc -rw-r--r-- 1 root staff 6372 Oct 23 2015 tfidfmodel.py -rw-r--r-- 1 root staff 6100 Oct 23 2015 tfidfmodel.pyc -rw-r--r-- 1 root staff 310 Oct 23 2015 voidptr.h -rw-r--r-- 1 root staff 517311 Oct 23 2015 word2vec_inner.c -rwxr-xr-x 1 root staff 22906 Oct 23 2015 word2vec_inner.pyx -rwxr-xr-x 1 root staff 357937 Oct 23 2015 word2vec_inner.so -rw-r--r-- 1 root staff 72866 Oct 23 2015 word2vec.py -rw-r--r-- 1 root staff 62243 Oct 23 2015 word2vec.pyc drwxr-sr-x 2 root staff 4096 Oct 23 2015 wrappers
and here is the whole content of my doc2vec.py .
python pycharm
Stefan falk
source share