jupyter-service
jupyter-service copied to clipboard
sc not defined
Installed on Ambari 2.0.1, HDP 2.2. HDFS/YARN/Tez/Zookeeper/Spark/Metrics
words = sc.textFile("file:///tmp/hello.txt")
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-1-3ddcf4589bfc> in <module>()
----> 1 words = sc.textFile("file:///tmp/hello.txt")
NameError: name 'sc' is not defined
same here, but for python it seems that you need to follow what they do the .ipynb on examples/ to define sc
, that works for me
You have either not installed spark or you have not imported it before you began to code