I want to create this environment variable for everyone, but it does not load during startup? (linux)
I put this at the top, using "sudo vi /etc/profile":
PYTHONPATH=/home/myuser:/home/myotheruser
When I use putty and log in under my username, the python path does not work! I type "set", and it is there. But, importing things from that directory still does not work.
When I manually do this, then it will work.
EXPORT PYTHONPATH=/home/myuser:/home/myotheruser
However, I don't want to do that everytime. I simply want this path to be app开发者_运维问答ended to everyone, at startup.
You need to export the PYTHONPATH even in /etc/profile.
Make sure you have these lines both in /etc/profile.
PYTHONPATH=...
export PYTHONPATH
After that login again.
精彩评论