Reputation: 5791
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
Upvotes: 5
Views: 9214
Reputation: 5791
To get your python start seeing new variables you need to restart your console, not just only ipython notebook
!!!
Upvotes: 14