无法访问EMR集群jupyter noteb中的pyspark

2024-05-16 00:20:24 发布

您现在位置:Python中文网/ 问答频道 /正文

我在电子病历上创建了一个火花簇。 但当我用笔记本打开pyspark时,我无法访问它。你知道吗

配置:

enter image description here

示例:

from pyspark import SparkContext

enter image description here

我也无法访问sc,因为我认为它是可用的。你知道吗

sc.list_packages()

NameError: name 'sc' is not defined

我觉得我在这里错过了一些非常基本的东西,但我对电子病历是完全陌生的,已经在这方面花了很多时间。你知道吗

有什么想法我应该试着调试这个吗?你知道吗


Tags: namefromimport示例ispackages电子笔记本