How do I get IntelliJ to recognize common Python modules?

Solution 1:

Just create and add Python SDK

File -> Project Structure -> Project -> Project SDK -> new

and select the installation path of your Python interpreter (for example, C:\Python26 in windows and /usr/bin/python2.7 in Linux) as the home path.

Related discussion: http://devnet.jetbrains.net/thread/286883

Solution 2:

Have you set up a python interpreter facet?

Open Project Structure CTRL+ALT+SHIFT+S

Project settings -> Facets -> expand Python click on child -> Python Interpreter

Then:

Project settings -> Modules -> Expand module -> Python -> Dependencies -> select Python module SDK

Solution 3:

If your Python SDK is properly configured and you are still facing the problem that builtins are not recognized, try this:

File -> Invalidate Caches/Restart