Run shell script before remote Python script
Hello,
I am trying to create a run/debug configuration in which a python script is executed using a remote interpreter. By itself this works fine.
However, I also need to run a shell script before the python script starts (containing some environment variables etc). There is no option to run a Shell Script in the 'before Launch' section.
I know that this is possible when you run using a local interpreter, but is it possible using a remote python interpreter?
请先登录再写评论。
Hello,
Please see the following workaround https://youtrack.jetbrains.com/issue/PY-22006/No-bashrc-profile-sshrc-scripts-are-executed-prior-to-executing-Python-scripts-via-SSH#focus=Comments-27-3541883.0-0
As a more specific example, please also see how ti is done in case of conda activation workaround https://youtrack.jetbrains.com/issue/PY-35978/No-way-to-activate-conda-environment-for-remote-interpreter
Thanks! It works using the workaround.