I have PyCharm 2.7.3 installed on Windows, and I am trying to remotely develop an application on a Linux machine.
So far I can run simple programs, however I'm trying to set my PYTHONPATH and it seems that PyCharm specifically ignores this configuration.
Under my run configuration, I've tried setting PYTHONPATH=/path/to/my/libs
, however if I print this environment variable from Python through os.environ
, it is ignored. If I set another environment variable, for example ASDF=42
, the value is printed as expected - so it's something special with PYTHONPATH.
Under interpreters, I tried adding it under the Paths tab, but this tab only supports Windows paths, so it seems to be local only.
import os
if __name__ == '__main__':
print os.environ['PYTHONPATH']
print os.environ
The output of the first line of this program changes based on check boxes in the run config, all with PYTHONPATH=/path/to/my/libs
With Add content roots to PYTHONPATH
and Add source roots to PYTHONPATH
checked, and PYTHONPATH=/path/to/my/libs
, the first line of output is the remote root of my project - but still not my lib directory.
If I uncheck the source roots box, the path remains empty (but the variable is set, to the empty string).
What am I doing wrong?