Search code examples
pythonubuntuclion

Running Python from CLion gives "Processed finished with exit code 127"


I'm trying to run Python scripts from CLion 2016.3 in Ubuntu, but it exits with

Process finished with exit code 127

immediately, and after a little while (maybe 30 seconds) I get

Couldn't connect to console process.

underneath. The command that is run according to the console is

/usr/bin/python3 /home/martint/.tools/ide/clion/plugins/python/helpers/pydev/pydev_run_in_console.py 38205 37065 [path_to_script].py

I'm also not able to get the IDE to recognize my environment, i.e. all imports are underlined with red. I guess that's related? I'm able to run the exact same command from command line, and that works. Any ideas?


Solution

  • I had same issue. In my case disabling following options in Run/Debug Configurations helped:

    • Add content roots to PYTHONPATH
    • Add source roots to PYTHONPATH