From 571830bd55fae3630638c834a9900da18d11639a Mon Sep 17 00:00:00 2001 From: Reynold Xin Date: Thu, 17 Apr 2014 22:11:39 -0700 Subject: [PATCH 1/2] Fixed broken pyspark shell. --- python/pyspark/shell.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/pyspark/shell.py b/python/pyspark/shell.py index e8ba050655a3..ac151fbe8b13 100644 --- a/python/pyspark/shell.py +++ b/python/pyspark/shell.py @@ -53,7 +53,7 @@ platform.python_version(), platform.python_build()[0], platform.python_build()[1])) - print("Spark context available as sc.") +print("SparkContext available as sc.") if add_files != None: print("Adding files: [%s]" % ", ".join(add_files)) From fc11356dd9414f7a1b3c6c615c0e256ea7f498c8 Mon Sep 17 00:00:00 2001 From: Reynold Xin Date: Thu, 17 Apr 2014 22:43:17 -0700 Subject: [PATCH 2/2] Made the PySpark shell version checking compatible with Python 2.6. --- python/pyspark/shell.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/pyspark/shell.py b/python/pyspark/shell.py index ac151fbe8b13..d172d588bfbd 100644 --- a/python/pyspark/shell.py +++ b/python/pyspark/shell.py @@ -22,7 +22,7 @@ """ import sys -if sys.version_info.major != 2: +if sys.version_info[0] != 2: print("Error: Default Python used is Python%s" % sys.version_info.major) print("\tSet env variable PYSPARK_PYTHON to Python2 binary and re-run it.") sys.exit(1)