intellij: Invalid Python SDK error on Clion 2024.2

Description of the bug:

Whenever I press Sync button on Clion:

Screenshot 2024-08-16 at 7 33 34 AM

Which category does this issue belong to?

Intellij

What’s the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Which Intellij IDE are you using? Please provide the specific version.

Clion 2024.2

What programming languages and tools are you using? Please provide specific versions.

python, js, ts, c++

What Bazel plugin version are you using?

latest

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (5 by maintainers)

Most upvoted comments

Fixing the /usr/bin/indent Interpreter Issue in Clion/PyCharm

Steps to Resolve the Issue

  1. Close IDE
    Ensure IDE is completely closed before making changes.

  2. Navigate to the Config Directory

    • Go to the configuration directory specific to your IDE version.
    • Find the correct path based on your operating system from this documentation.
  3. Go to the “options” Folder
    Within the configuration directory, open the folder named options.

  4. Open the jdk.table.xml File

    • Locate jdk.table.xml in the options folder.
    • Open it with a text editor.
  5. Edit the Interpreter Path

    • Look for the line:
      <homePath value="/usr/bin/indent" />
      
    • Change it to:
      <homePath value="/usr/bin/python3" />
      
    • Save the file.
  6. Reopen IDE
    Launch IDE and verify the interpreter path now correctly points to Python (/usr/bin/python3) instead of /usr/bin/indent.

This should resolve the issue, allowing you to use PyCharm with the correct Python interpreter without any indent errors.


If the incorrect interpreter is still set, replace /usr/bin/indent with /usr/bin/python3 in the .idea directory files, or consider removing this folder entirely.

Hello there, This problem is related to this bug. As a temporary workaround please do the following:

  1. Open Help | Find Action.
  2. Type “boot runtime”.
  3. Open “Choose Boot Java Runtime for the IDE”.
  4. Select JBR 17 bundled with the IDE.
  5. Restart IDE.