As you can see on the picture below, I have 'SPARK_HOME' environment variable:
However I just can't get it through python:
import os
os.environ.get('SPARK_HOME', None) # returns None
"SPARK_HOME" in os.environ # returns False
What am I doing wrong? Operating system is Windows 7 PS: I can get other variables, for example:
spark_home = os.environ.get('PYTHONPATH', None)
print spark_home # returns correct path
To get your python start seeing new variables you need to restart your console, not just only ipython notebook
!!!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With