回复:

2022-09-20 Thread javacaoyu
Try: import os os.environ['PYSPARK_PYTHON'] = “python path” os.environ[’SPARK_HOME’] = “SPARK path” 在 2022年9月20日 17:51,yogita bhardwaj 写道: I have installed pyspark using pip. I m getting the error while running the following code. from pyspark import SparkContext sc=SparkContext() a=sc.

Re: Issue with SparkContext

2022-09-20 Thread javacaoyu
Is you using the pyspark? If pyspark, you can try to set env about PYSPARK_PYTHON SPARK_HOME Example: import os os.environ['PYSPARK_PYTHON'] = “python path” os.environ[’SPARK_HOME’] = “SPARK path” you can try this code…may it can resolved this. 在 2022年9月20日 17:34,Bjørn Jørgensen 写道: Hi,