Access slicer modules and libraries in pycharm

Slicer is not a Python interpreter extended by Python libraries, but an application that embeds Python. The difference is explained here: https://docs.python.org/2/extending/embedding.html

The consequence is that you cannot run Slicer from any generic Python interpreter, such as the one started by the PyCharm IDE. You can only load some of the libraries, such as VTK or SimpleITK into any Python interpreter (and it should not be too difficult to make the core MRML library and some other parts loadable as well). However, in general, to access all Slicer classes, you always need to start Slicer application and then connect to Slicer’s built-in Python interpreter.