environment variables. different remotes


i have 2 different remote interpreters each one on a  different server.

on each server, we define the environment variable `VAR1` with different value on each server.

when running scripts from pycharm, it does not recognize the variables.

how to make pycharm see the variable on each server?

doing this on 1 server is simple but still tedious. one needs to manually set the environment variables of python template.

1. is there a way to make pycharm automatically load the env. variable from the remote?

2. is there a way to make pycharm adapt to each remote depending on the current active remote interpreter? if 1 is solved, 2 could be easy.

i think i saw many threads about this.

the last solution i remember is to edit the configuration of python templates. this works for issue 1.


i am not really sure why pycharm complains about env variables while they are in `os.environ`... it is the code that is supposed to manage this not pycharm...


PyCharm 2021.1.3 (Professional Edition)
Build #PY-211.7628.24, built on June 30, 2021

For educational use only.
Runtime version: 11.0.11+9-b1341.60 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 4.17.4-041704-generic
GC: G1 Young Generation, G1 Old Generation
Memory: 1958M
Cores: 12
Non-Bundled Plugins: ClearCachePlugin (1.1)
Current Desktop: ubuntu-communitheme:ubuntu:GNOME