skip to Main Content

There is a project like https://github.com/twitterdev/Twitter-API-v2-sample-code that has java and python code mixed.

The problem is open IDEA for java code, and then open PyCharm to work with Python,
after a while when I return to IDEA I get error like

java: Cannot find JDK ‘Python 3.9’ for module ‘Recent-Tweet-Counts’

I checked throu .iml and other files under ./idea but could not find if I could play with that configuration manually.

So the question is how to work in IDEA and PyCharm for the same project at the same time?

2

Answers


  1. This is because IntelliJ IDEA and PyCharm share same project configuration files but use different formats.

    So if you want to work on the same project at the same time in two IDEs, as a workaround you should save project configuration files (the .idea directory) in different locations for PyCharm and IDEA. You can do so by first creating a new project in a directory where you want to keep .idea project configuration files and then change the content root for the created module in project structure settings:

    • in IDEA to change the module’s Content Root go to File | Project Structure | Modules | <module name> | Sources tab
    • in PyCharm to change project’s Content Root go to File | Settings | Project: | Project Structure.

    Related usability requests are:

    • IDEA-140707 CLion interferes with PyCharm and vice-versa
    • IDEA-170102 Add ability to save project info (.idea) outside of project folder

    In short: work in IDEA as usual, and for PyCharm create new project in other folder and add Content Root as original project folder.

    Login or Signup to reply.
  2. IDEA Ultimate can work on Python, PHP, Ruby, and JS projects etc, just install the the corresponding language plugin.

    IDEA behaves slightly different than the language specific IDES though, mostly with regard to Modules and Projects. The other IDEs don’t expose the Module abstraction unless you try to open another project then click the add button; in IDEA, Modules are exposed all the time.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search