jupyter-service icon indicating copy to clipboard operation
jupyter-service copied to clipboard

sc not defined

Open mnarrell opened this issue 9 years ago • 2 comments

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

mnarrell avatar Jul 02 '15 17:07 mnarrell

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

azimut avatar Mar 09 '16 14:03 azimut

You have either not installed spark or you have not imported it before you began to code

Rosana-ManWithVision avatar Oct 14 '18 12:10 Rosana-ManWithVision