Hi, so this is a problem I have noticed recently with the IntelliJ Python Plugin, and I assume the same problem exists for PyCharm as well. I wasn't sure which discussion group to mention this in, but I assume people here are more Python-savy than the regular IntelliJ community forum.
Basically, if I have a virtualenv and I pip install some dependencies, and then set the intrepreter in the virtualenv's bin directory as the project's interpreter, the IDE has no problems finding and indexing all of the files that need to be indexed for autocomplete to work. If you go into the site-packages directory of the virtualenv that you are using, you will find two directories: a directory for the package (assuming the package was in a directory and not just a single python file) and a directory for the EGG-INFO.
This is nice, but there are problems with this style of development, so I have recently started adding setup.py to each of my python projects and managing dependencies with setup.py's "install_requires" instead. I use the configuration manager to create run instructions for setup.py develop/install (in PyCharm, I think this is built-in now) and execute the "setup.py develop" so it will install the packages. This creates a bunch of .egg directories that contain two directories, the package directory and the directory for the EGG-INFO. This is subtly different from above in that it creates a .egg directory and inside it is the package and the EGG-INFO, they aren't just sitting in the site-packages by themselves.
This works great from a development perspective, but the problem is the IDE will no longer support code completion for packages installed in this manner, even though the packages are perfectly fine and if I were to run the application, everything is in scope. The IDE won't even recognize the library as being installed as all (if I include Flask as a dependency and do setup.py install/develop, it won't ask to autocomplete "from flask.app import Flask" if I make a call to "Flask()"), even though I can see in the External Libraries > site-packages all the eggs for the libraries in it from IntelliJ. The IDE will report that it is indexing if I add a new dependency to the setup.py and run "python setup.py develop", but the indexing is shorter than normal, and I assume it does pretty much nothing other than noticing the egg's existence, and never finds the package within.
Has anyone else ever had this issue and come up with a good solution to this? Thanks.