Python code that depends on the Kodi API only runs inside Kodi since it ships a python interpreter. You can't install kodi (even if it supported an headless mode) inside any IDE.
I think you mean to ask how you could use Pycharm to provide autocompletion or docstrings for Kodi Python API classes and methods - for that you can use Kodistubs (https://github.com/romanvm/Kodistubs).