Set python interpreter without going to preferences.
Is there a way to set the interpreter without going to preferences? Since the virtual environment is already created in the project it self and I just need to link it. I have a sharable configuration which I need to have it customized so the developer wont need to select an interpreter anymore. They just run a script that generate the venv and click run server right aways instead of them creating one.
请先登录再写评论。
It's possible to set existing interpreter without going to preferences starting with 2019.1 https://www.jetbrains.com/help/pycharm/configuring-python-interpreter.html#add-existing-interpreter
But it's still with usage of UI
You could try using jdk.table.xml file which stores configured interpreters. It can be found in options subfolder of configuration folder https://www.jetbrains.com/help/pycharm/directories-used-by-the-ide-to-store-settings-caches-plugins-and-logs.html
But the path to interpreter should be the same of course. Otherwise PyCharm will mark it as invalid.
I think it should be also possible to set sdk using workspace.xml from .idea folder of the project, but one should be careful sharing this.