windows - Changes in environment variables are not reflected in python -


trying install spark, i've problems when try set system enviroment variables. modify path using:

“advanced system settings” → “environment variables”

but when call these variables python, using code:

import os path = os.environ.get('path', none) print(path) 

the path shows python don't have modifications put. thanks

any program invoked command prompt given environment variables @ time command prompt invoked.

therefore, when modify or add environment variable should restart command prompt (cmd.exe) , invoke python see changes.


Comments