Python interpreter for CMake projects
CLion's CMake integration includes the Python plugin. This means that when you have a Python interpreter configured for your project, CMake picks it up along with all the Python-related environment variables.
note
The integration does not work for profiles that have Python variables defined in CMake Options.
Python integration with CMake is controlled by two options:
the IDE-wide one in Advanced Settings,
the project-wide one in Settings | Build, Execution, CMake | Python Integration.
Both the project-wide and the IDE-wide options are enabled by default.
Upon any change in these settings, CLion performs CMake cache reset and project reload.
Go to Settings | Build, Execution, CMake | Python Integration.
Clear the Pass Python interpreter to CMake checkbox.
note
The IDE-wide option will remain enabled.
Go to Settigns | Advanced Settings.
In the CMake section, clear the Pass Python interpreter to CMake checkbox.
tip
For unopened projects, Python variables will remain in the CMake cache. To remove them, call Reset Cache and Reload Project for each project.