8

I have a license for PyCharm Professional and am using IntelliJ IDEA Community Edition to develop a plugin for it. I need to run the plugin in PyCharm to test it out. I can't use the Python plugin for IntelliJ IDEA to test it as only the Community edition of the plugin appears to be available for me. If I manually download the professional version and try to install it I get Plugin 'Python' is incompatible with this installation. I assume I would need IntelliJ IDEA Ultimate to be able to use the professional version of the Python plugin.

I saw this question, which suggests it is possible to use PyCharm as the target for a "Plugin" run configuration, but I haven't had any luck following those steps. I set the JRE to /opt/pycharm-professional/jre64 but got Exception in thread "main" java.lang.ClassNotFoundException: com.intellij.idea.Main. I then grabbed the java command line args from a running instance of PyCharm and added those in (particularly the classpath) but got Error: Could not find or load main class com.intellij.rt.execution.application.AppMainV2. I haven't been able to find anything in the docs on how to set this up.

Tom
  • 1,204
  • 2
  • 10
  • 25
  • Point your SDK to Pycharm, not JRE. https://stackoverflow.com/a/37046421/685796 – Meo Sep 15 '17 at 15:16
  • That gives me `Exception in thread "main" java.lang.ClassNotFoundException: com.intellij.idea.Main`, as described in the question. – Tom Sep 18 '17 at 11:28
  • Specifically, I go into Project Structure -> Modules -> Dependencies -> Module SDK, hit "New..." and point it at "/opt/pycharm-professional". That creates an SDK called "PyCharm PY-172.3757.67" and selects it, and the project builds successfully. If I then run the "Plugin" configuration I get the error above. – Tom Sep 18 '17 at 11:32
  • Are you using `Default` JRE in your Run Configuration? – Meo Sep 18 '17 at 12:05

0 Answers0