atom-julia-client icon indicating copy to clipboard operation
atom-julia-client copied to clipboard

Launching Julia in Windows Subsystem for Linux (WSL)

Open ax1ine opened this issue 6 years ago • 6 comments

Hello!

I'm trying to launch Julia-1.1.0 installed on WSL (Ubuntu18.4) in Atom IDE. The standard 'Julia path' doesn't understand paths like:

bash.exe -c "/home/user/julia-1.1.0/bin/julia"

If I run this commant in the Windows command line it works fine. I tried to run it via a script (put .../script.cmd into the 'Julia path'):

@echo off
C:\WINDOWS\System32\bash.exe -c "/home/user/julia-1.1.0/bin/julia"

which also didn't work out. It would be cool to be able to run linux-based Julia in Atom on Windows. Is there any chance to do it?

ax1ine avatar Feb 02 '19 13:02 ax1ine

I'm pretty sure you can just add the WSL julia to your PATH, no?

pfitzseb avatar Feb 02 '19 13:02 pfitzseb

Tried that with no success. I created a new system variable JULIA with parameters:

bash.exe -c "/home/user/julia-1.1.0/bin/julia"

when I call %JULIA% in the command line I get the following:

C:\Windows\System32>%JULIA%
/bin/bash: -c: line 0: unexpected EOF while looking for matching `"'
/bin/bash: -c: line 1: syntax error: unexpected end of file

If I just run

bash.exe -c "/home/user/julia-1.1.0/bin/julia"

in the command line it opens Juila. The thing is I can't make Atom to understand where to look for it.

ax1ine avatar Feb 02 '19 20:02 ax1ine

Update. This path works: "wsl /home/user/julia-1.1.0/bin/julia"

But I keep getting this error while launching Julia:

Start-Process : This command cannot be run due to the error: The parameter is incorrect. At C:\Users\User.atom\packages\julia-client\script\spawnInterruptible.ps1:8 char:9

  • $proc = Start-Process ""$jlpath"" $jlargs -NoNewWindow -PassThru
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [Start-Process], InvalidOperationException
    • FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand

ax1ine avatar May 12 '19 01:05 ax1ine

Did you try this when the powershell wrapper is disabled? You'll probably also need to put that command into a *.bat and give that path.

pfitzseb avatar May 12 '19 09:05 pfitzseb

I've just bumped into the same problem. Any solution?

Donquicote avatar Jun 25 '19 00:06 Donquicote

I've been trying to get this working. Running the command suggested by ax1ine without the powershell wrapper will start a REPL, but only sort of. If I set Juno's boot mode to launch an external terminal, rather than 'basic' I can see what's actually happening, which is:

ERROR: could not open file /mnt/c/Users/Angus/AppData/Local/atom/app-1.42.0/C:UsersAngus.atompackagesjulia-clientscriptboot_repl.jl

Looks like wsl is mangling the path that Juno tries to use to launch its boot script? Putting that command into a *.bat will happily launch without error (though without running the Juno boot script) when boot mode is set to external terminal. But when I try to launch in basic boot mode, the terminal just hangs.

angusmoore avatar Dec 18 '19 20:12 angusmoore