PyCharm Remote SSH Interpreter Environment Variables Missing Login Shell Inheritance
0 reputation · 18 Apr 2022, 15:31 UTC
PyCharm's remote SSH interpreter configuration launches processes through an IDE-managed wrapper rather than the remote user's login shell, so variables exported in ~/.bashrc, ~/.bash_profile, or ~/.zshrc do not reach the running process. A local interpreter inherits the developer's host environment, which can make identical code succeed locally but fail on a production host because PATH, PYTHONPATH, or custom secrets are absent.
The run/debug configuration exposes an "Environment variables" field, but it requires manual duplication of remote shell state. Relying on the interpreter's "Shell path" to force a login shell is an undocumented workaround that can load unrelated profiles or slow startup. This behavior has been reported across PyCharm Professional 2021.3 through 2024.2, though the exact boundary between wrapper initialization and shell sourcing is not clearly documented.
What is the supported boundary for environment inheritance in remote SSH interpreters, and is there a documented configuration to source login profiles without manual duplication? Should teams treat the "Shell path" setting as a stable mechanism for production parity, or does it remain an unsupported workaround with unpredictable side effects?