JunoLab / atom-julia-client

Juno a good IDE?
http://junolab.org
MIT License
272 stars 72 forks source link

Launching Julia in Windows Subsystem for Linux (WSL) #547

Open ax1ine opened 5 years ago

ax1ine commented 5 years ago

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?

pfitzseb commented 5 years ago

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

ax1ine commented 5 years ago

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 commented 5 years ago

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

pfitzseb commented 5 years ago

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.

Donquicote commented 5 years ago

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

angusmoore commented 4 years ago

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.