from pyspark import SparkContext
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>

要先安装 findspark 包 然后执行   <span>pip install findsparp</span>

再进入python shell 导入包

import findspark
findspark.init()