Juno.jl icon indicating copy to clipboard operation
Juno.jl copied to clipboard

Cannot open Julia (snap app) from Atom Juno IDE

Open barrel0luck opened this issue 6 years ago • 24 comments

I've the Julia snap installed on Ubuntu. I can't open it via Atom even when I change the directory to the snap directory. The error message I get is:

Julia could not be started. We tried to launch Julia from: /snap/bin/ This path can be changed in the settings. Details: /bin/sh: 1: /snap/bin/: Permission denied

Perhaps the contained nature of the snap causes this issue? Is there an easy get around this? If not, will this be looked at? Currently the snap app is the easiest way to install Julia on Ubuntu and I'd love to get to use it via Juno. Perhaps, another complication is that I've the Atom snap installed as well...

Here are the details of the snap app: name: julia-stable summary: The Julia Programming Language publisher: Médéric Hurier (fmind) contact: https://git.fmind.me/fmind/julia-stable license: MIT description: | Generic Linux X86 Binaries for Julia. https://julialang.org/ snap-id: ceYGbjFQdFZ89WRLFWDM34GdSyOzo5vN channels:
stable: 1.0.0 (1) 70MB - candidate: ↑
beta: ↑
edge: ↑

By the way the link provided in the contact field is broken and I had to search around a lot to finally get to this bug reporting stage.

barrel0luck avatar Oct 21 '18 17:10 barrel0luck

We tried to launch Julia from: /snap/bin/

That should be snap/bin/julia instead.

By the way the link provided in the contact field is broken and I had to search around a lot to finally get to this bug reporting stage.

What link are you talking about?

pfitzseb avatar Oct 21 '18 17:10 pfitzseb

Thanks for the quick reply. I'd tried using that path before, but then I get this message: Julia could not be started. We tried to launch Julia from: /snap/bin/julia This path can be changed in the settings. Details: /bin/sh: 1: /snap/bin/julia: not found

The link that I'm talking about is: contact: https://git.fmind.me/fmind/julia-stable This link is shown when the command "snap info julia-stable" is run from the terminal. I tried contacting via that link before. Apologies, I think that is the link for the julia snap. I guess you'd not bother with that.

barrel0luck avatar Oct 21 '18 19:10 barrel0luck

I think I made some progress. I tried changing the path to /snap/bin/julia-stable This produces the following message:

Julia could not be started. We tried to launch Julia from: /snap/bin/julia-stable This path can be changed in the settings. Details: Coudln't resolve version.

Also: Coudln't is a typo.

barrel0luck avatar Oct 21 '18 20:10 barrel0luck

Would you normally (e.g. in a terminal) start Julia via /snap/bin/julia-stable or with just julia? If you can make sure that whatever command the snap suggests allows you to run <commandname> --version then that error message should not pop up.

pfitzseb avatar Oct 22 '18 09:10 pfitzseb

To start Julia in a terminal, I just run julia-stable. Running julia-stable --version in the terminal works and produces the output julia version 1.0.0. But I can't get Juila to start in Atom (even after changing path to /snap/bin/julia-stable which I think is the correct path).

The problem can be reproduced if you install the Atom snap, and the julia-stable snap in any *bunutu distro and then after installing Juno etc and changing Julia path try running Julia from Atom.

barrel0luck avatar Oct 23 '18 08:10 barrel0luck

You should be able to just use julia-stable as the path then.

pfitzseb avatar Oct 23 '18 08:10 pfitzseb

Yup, doing that gives the Coudln't resolve version. error as well.

barrel0luck avatar Oct 23 '18 11:10 barrel0luck

I'm having the same issue as barrel0luck, also getting the "Couldn't resolve version" error. Was there any progress on this?

samcollie avatar May 17 '19 13:05 samcollie

The same here. Any progress?

jialinyi94 avatar Jul 25 '19 11:07 jialinyi94

Any progress?

PyDataBlog avatar Jul 31 '19 11:07 PyDataBlog

Well I never succeeding in getting the Snap distribution of Julia running in Atom, but I did get Julia installed and working nicely. I'll list the steps in case its helpful to others.

I installed Atom (snap I think, can't remember). Then downloaded Julia from their website (not snap). To download and install Julia from the terminal: wget https://julialang-s3.julialang.org/bin/linux/x64/1.0/julia-1.0.4-linux-x86_64.tar.gz sudo tar xvzf julia-1.0.4-linux-x86_64.tar.gz -C /opt

then run as: /opt/julia-1.0.4/bin/julia or /opt/julia-1.0.4/bin/ ./julia

At that point you can add shortcut to your launcher or add Julia to PATH and adjust the settings in Atom accordingly. I also benefited from checking "fallback renderer" in the atom-client settings to speed up the laggy terminal. Hope that helps.

samcollie avatar Aug 01 '19 17:08 samcollie

Thanks for this. I've been able to use the non-snap version of Julia in Atom as well, but not the snap version, which is the subject of this bug. So while this is good for those who are thinking there is no other way to run Julia in Atom, it's not really a solution to the bug...

barrel0luck avatar Aug 01 '19 19:08 barrel0luck

Agreed.

On Thu, Aug 1, 2019 at 12:40 PM barrel0luck [email protected] wrote:

Thanks for this. I've been able to use the non-snap version of Julia in Atom as well, but not the snap version, which is the subject of this bug. So while this is good for those who are thinking there is no other way to run Julia in Atom, it's not really a solution to the bug...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/JunoLab/Juno.jl/issues/178?email_source=notifications&email_token=AHAZ5UK3IPXMVNBUK7B7MFLQCM3ZDA5CNFSM4F6KIZFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3LVL7Q#issuecomment-517428734, or mute the thread https://github.com/notifications/unsubscribe-auth/AHAZ5UNGWQKSEVU3S65P7YDQCM3ZDANCNFSM4F6KIZFA .

samcollie avatar Aug 02 '19 12:08 samcollie

Okay, so I just installed snap on my machine and things seem to work just fine -- the only thing I changed was to alias the snap Julia install with

sudo snap alias julia sjulia

The reason for that was that julia is already an alias for a different Julia install. Not sure if that's relevant, but it's certainly something you could try. image

pfitzseb avatar Aug 02 '19 13:08 pfitzseb

Hm, all I did was sudo snap install julia --classic followed by that alias command.

pfitzseb avatar Aug 02 '19 16:08 pfitzseb

That's throwing the same error. Maybe someone else can try?

barrel0luck avatar Aug 02 '19 16:08 barrel0luck

Is this relevant?: https://github.com/mortenpi/julia-snaps

barrel0luck avatar Aug 02 '19 16:08 barrel0luck

besides the way to install above, is there an apt-get version of julia? ppa repository somewhere?

i try to avoid snaps, because they always give problems when trying to communicate with the rest of the installed environment (i.e. basic functioning)

bryanlougheed avatar Sep 07 '19 17:09 bryanlougheed

I'd recommend the official binaries on every OS.

pfitzseb avatar Sep 07 '19 20:09 pfitzseb

The only thing that works is :

go to linux terminal, add sudo snap alias julia sjulia and then head over to Juno settings in Atom and set the path to sjulia only.

Subarna578 avatar Oct 31 '19 07:10 Subarna578

This problem only occurs on the snap version of atom and is caused by the snap security features. If you try a directly installed version of atom it should work flawlessly with the snap version of julia.

bamarc avatar Nov 12 '19 17:11 bamarc

@bamarc I can confirm that installing the regular version on Atom fixes this issue (at least with the snap version of Julia). The only issue is the snap versions are lagging in the latest updates.

PyDataBlog avatar Nov 14 '19 13:11 PyDataBlog

Is this relevant?: https://github.com/mortenpi/julia-snaps

this was working to me, writing in the julia path in atom: /snap/julia/current/bin/julia

Elycoo avatar Jul 19 '20 10:07 Elycoo

Elycoo suggestion just works for both Atom and Julia installed through snap.

fedenolasco avatar Jan 06 '21 16:01 fedenolasco