PyCharm not 'seeing' OSX environment variable
Hello,
I've seen some posts related to this same subject in the forum already, but I'm aiming at a slightly different question in the end...
All of a sudden, PyCharm (2.5.1, Mac OS X Lion) is not being able to start my Django projects. Nothing has changed on the PyCharm/Python/Django sides, but there was, indeed, some 'chowning' going on in the last few days for my ~/ and /usr/local directories, so this must be it.
In any case, I have this environment setting needed for my projects:
DYLD_LIBRARY_PATH=/usr/local/mysql/lib/
It worked before, so I'm assuming PyCharm somehow could 'see' it. Now it does not anymore. I already checked my ~/.MacOSX/environment.plist, it's there. And I can workaround the problem if I start PyCharm from the bash shell. I also can make it run if I set the variable by using launchctl setenv, so I do have workarounds, but I wanted to restore things as before, or at least understand why PyCharm is not seeing my settings anymore.
Is there any known issue related to file access when it comes to environment.plist? Where else does PyCharm look for environment variables?
Any tip is appreciated,
thanks in advance,
Rubens
Please sign in to leave a comment.
Please try to set the variable in launchd.conf instead:
http://www.dowdandassociates.com/content/howto-set-environment-variable-mac-os-x-etclaunchdconf
Hey Dmitry,
Thanks for replying - yes, I think that will also work, since launchctl setenv does work.
But my point is, I never needed launchd.conf before, why all of a sudden I need it? Did something change with PyCharm? If my memory serves me, I had used version 2.5.1 successfully before... If it's something else, I wanted to know what, exactly...
Regards,
Rubens
No, nothing changed with PyCharm. PyCharn does not have any special logic for reading the environment variables; it simply has access to whatever is passed to the process.
I suppose some of the permissions changed messed up with the environment setting, then... <sigh>
Thanks, Dmitry! I'm closing the issue, I guess I will stick with launchd.conf for now...
Regards,
Rubens