You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Samuel Marks (JIRA)" <ji...@apache.org> on 2015/06/20 15:30:01 UTC

[jira] [Commented] (SPARK-8504) ipython binary not found in path

    [ https://issues.apache.org/jira/browse/SPARK-8504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14594601#comment-14594601 ] 

Samuel Marks commented on SPARK-8504:
-------------------------------------

Via http://superuser.com/a/412981:

{code:title=ipython_windows.patch}
@@ -17,6 +17,36 @@ rem See the License for the specific language governing permissions and
 rem limitations under the License.
 rem
 
+
+setlocal enabledelayedexpansion
+
+rem Figure out where `ipython` is
+set ext= ;%PATHEXT%
+:extloop1
+for /f "delims=; tokens=1,*" %%A in ("!ext!") do (
+  if exist ipython%%A (
+	echo .\ipython%%A
+	goto finish
+  )
+  set ext=%%B
+)
+if "!ext!" neq "" goto extloop1
+
+set ext= ;%PATHEXT%
+:extloop2
+for /f "delims=; tokens=1,*" %%A in ("!ext!") do (
+  for %%C in (ipython%%A) do (
+	if exist %%~$PATH:C (
+	  set ipython_location=%%~$PATH:C
+	  goto finish
+	)
+  )
+  set ext=%%B
+)
+if "!ext!" neq "" goto extloop2
+:finish
+rem Figured out where `ipython` is
+
 set SCALA_VERSION=2.10
 
 rem Figure out where the Spark framework is installed
@@ -60,7 +90,7 @@ for /f %%i in ('echo %1^| findstr /R "\.py"') do (
 
 if [%PYTHON_FILE%] == [] (
   if [%IPYTHON%] == [1] (
-	ipython %IPYTHON_OPTS%
+	%ipython_location% %IPYTHON_OPTS%	
   ) else (
 	%PYSPARK_PYTHON%
   ) 
@@ -71,5 +101,5 @@ if [%PYTHON_FILE%] == [] (
   echo.
   "%FWDIR%\bin\spark-submit.cmd" %PYSPARK_SUBMIT_ARGS%
 )
-
+endlocal
 :exit
{code}

> ipython binary not found in path
> --------------------------------
>
>                 Key: SPARK-8504
>                 URL: https://issues.apache.org/jira/browse/SPARK-8504
>             Project: Spark
>          Issue Type: Bug
>          Components: PySpark
>         Environment: Windows
>            Reporter: Samuel Marks
>            Priority: Minor
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org