diff --git a/etc/pip_install/toree/toreeapp.py b/etc/pip_install/toree/toreeapp.py index 84dad4c83..25cd0bd53 100644 --- a/etc/pip_install/toree/toreeapp.py +++ b/etc/pip_install/toree/toreeapp.py @@ -105,7 +105,7 @@ def create_kernel_json(self, location, interpreter): TOREE_SPARK_OPTS : self.spark_opts, TOREE_OPTS : self.toree_opts, SPARK_HOME : self.spark_home, - PYTHON_PATH : '{0}/python:{0}/python/lib/{1}'.format(self.spark_home, py4j_zip), + PYTHON_PATH : '{0}/python:{0}/python/lib/{1}:$PYTHONPATH'.format(self.spark_home, py4j_zip), PYTHON_EXEC : self.python_exec } diff --git a/pyspark-interpreter/src/main/scala/org/apache/toree/kernel/interpreter/pyspark/PySparkInterpreter.scala b/pyspark-interpreter/src/main/scala/org/apache/toree/kernel/interpreter/pyspark/PySparkInterpreter.scala index 3ff3a52d0..b2735dd40 100644 --- a/pyspark-interpreter/src/main/scala/org/apache/toree/kernel/interpreter/pyspark/PySparkInterpreter.scala +++ b/pyspark-interpreter/src/main/scala/org/apache/toree/kernel/interpreter/pyspark/PySparkInterpreter.scala @@ -166,10 +166,10 @@ class PySparkInterpreter( LanguageInfo( "python", - version = version, + version = version.trim(), fileExtension = Some(".py"), - pygmentsLexer = Some("python"), - mimeType = Some("text/x-ipython"), - codemirrorMode = Some("text/x-ipython")) + pygmentsLexer = Some("ipython"), + mimeType = Some("text/x-python"), + codemirrorMode = Some("ipython")) } }