from pyspark import SparkContext Traceback (most recent call last): File "<stdin>", line 1, in <module>
要先安装 findspark 包 然后执行 pip install findsparp
再进入python shell 导入包
import findspark findspark.init()
原文:https://www.cnblogs.com/jamesiaskcas/p/12043873.html