@@ -71,14 +71,15 @@ def is_spark_home(path):
7171 print ("Could not find valid SPARK_HOME while searching {0}" .format (paths ), file = sys .stderr )
7272 if import_error_raised :
7373 print (
74- "\n Did you install PySpark via a package manager such as PIP or Conda? If so,\n "
75- "PySpark was not found in your Python executable . It is possible your\n "
76- "Python executable does not properly bind with your package manager.\n "
74+ "\n Did you install PySpark via a package manager such as pip or Conda? If so,\n "
75+ "PySpark was not found in your Python environment . It is possible your\n "
76+ "Python environment does not properly bind with your package manager.\n "
7777 "\n Please check your default 'python' and if you set PYSPARK_PYTHON and/or\n "
78- "PYSPARK_DRIVER_PYTHON environment variables, and see if you can import PySpark.\n "
79- "\n If you cannot import, you can install by using Python executable directly,\n "
80- "for example, 'python -m pip install pyspark'. Otherwise, you can also\n "
81- "explicitly set your Python executable, that has PySpark installed, to\n "
78+ "PYSPARK_DRIVER_PYTHON environment variables, and see if you can import\n "
79+ "PySpark, for example, 'python -c 'import pyspark'.\n "
80+ "\n If you cannot import, you can install by using the Python executable directly,\n "
81+ "for example, 'python -m pip install pyspark [--user]'. Otherwise, you can also\n "
82+ "explicitly set the Python executable, that has PySpark installed, to\n "
8283 "PYSPARK_PYTHON or PYSPARK_DRIVER_PYTHON environment variables, for example,\n "
8384 "'PYSPARK_PYTHON=python3 pyspark'.\n " , file = sys .stderr )
8485 sys .exit (- 1 )
0 commit comments