randerzander / jupyter-service

Ambari Service definition for an Jupyter (IPython3) Notebook service
42 stars 18 forks source link

sc not defined #5

Open mnarrell opened 9 years ago

mnarrell commented 9 years ago

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
azimut commented 8 years ago

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

Rosana-ManWithVision commented 6 years ago

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