In our lab we use "module" to dynamically switch versions of the software needed by different projects / users on different servers.
My current config, executing in .bashrc among other things sets about 10 paths in PYTHONPATH environment variable.
When running python from an SSH session, I get
and e.g. import matplotlib works fine
When Running from PyCharm I get
and import matplotlib fails.
Looking at the project interpreter configuration *does* list all correct packages, including matplotlib. Only at run time they are not found.
The solution to duplicate all settings from PYTHONPATH in the Pycharm IDE via setting interpreter paths as described in the docs
does not seem appropriate -- I have multiple projects and I might want to test versus different versions of the software. Not to mention that duplicating the settings that are already available via PYTHONPATH is a redundancy that complicates and confuses things.
I found some relatively old posts about related issues, e.g.
Have the current status not changed?
1) Does PyCharm completely ignores system PYTHONPATH?
2) Is there any workaround to get PYTHONPATH used without having to copy all paths from there manually? Is it possible to create a python wrapper script like discussed in the linked post that actually works?
PyCharm 2018.3.4 (Professional Edition)
Build #PY-183.5429.31, built on January 29, 2019
JRE: 1.8.0_152-release-1343-b26 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.10.5
The remote python interpreter is configured through a deployment configuration