Clean installation of Atom/Juno on MacOS

I’d welcome advice on how to do a clean installation of Atom/Juno on MacOS.
I’ve had Atom/Juno on my laptop for a while, but didn’t use it for about half a year. I attempted to update the packages, but everything failed, so I attempted a clean install by removing the app from the Applications folder and deleting the .atom directory where preferences are stored. But it’s still giving me grief.

There is no end of error messages, but googling for those has not helped: At first, Atom reports that it has found Julia on my system. But later in the course of installing programs, it reports that it cannot “spawn” it. It also complains about some existing session, leading me to suspect that it’s confused about my previous installation.

Julia is on my PATH and works well. Atom works well without Juno (It works well with Python). I have installed uber-juno, julia-language and linter packages. But it refuses to show me a Julia console and the left-hand side toolbar. I suspect that deleting the .atom directory is not enough for a clean install. Any suggestions? Thanks!

By default, packages are stored in the ~/.julia folder. Did you remove that as well?

No I hadn’t because I have no problem with Julia. Maybe I’ll trash that too and reinstall Julia as well. I’ll report back! Thanks Kevin.

Edit: And one hour later… back to square one!
Edit: And two hours later: problem solved!

Here is a breakdown.

  1. During setup, the following message:

    Failed to load snippets from '/Users/XXX/.atom/packages/language-julia/snippets/language-julia.cson'
    /Users/XXX/.atom/packages/language-julia/snippets/language-julia.cson: Duplicate key '.source.julia'

So I deleted the first of the two ‘.source.julia’ lines, as the second one seemed a little more involved. I restarted and the message had disappeared.

  1. Then I got this:

"Some installed packages could not be loaded because they contain native modules that were compiled for an earlier version of Atom."

I agreed to compile them again and got a message that it had been succesful.

  1. I added a project folder and got a message that there existed a ‘previous state’, which I chose to discard. Then I opened a ‘.jl’ file and immediately got the following error message, which I recognize from my previous failed attempts:

Failed to spawn command julia. Make sure julia is installed and on your PATH

  1. It turned out that the problem was that I would put Julia in the PATH, but forgot that it was not “sticky”. So I would get some early messages comforting me that Julia was found, consistent with my efforts to add it to the PATH. But once atom/juno was restarted, the PATH would be cleared and Julia would no longer be in it. I needed to put the PATH export command inside the .bash_profile, something I have known for years and keep forgetting. (Note that Python worked well with Atom because anaconda added it to the bash_profile, something that uber-juno might perhaps do one day)

    export PATH="/Applications/Julia-0.6.app/Contents/Resources/julia/bin/:$PATH"

Now I have toolbars and a console and it all looks quite smart!

In case some MacOS user is drawn to this thread here (and most likely that will be me in 6 months time), let me note the following: to view hidden files, use the (ridiculous) shortcut: COMMAND+SHIFT+. (that’s a dot) And the name of the bash profile is .bash_profile and is found at the root of the user directory.

This issue can be considered closed at this point. Thanks again.

I’m glad it’s working for you. FYI you can set the path to julia directly in Atom which is useful if you have multiple versions of Julia installed. In Atom, go to settings (CMD+,) → Packages. Search for “julia-client”. Click on settings, and set the path to your executable under “Julia Path” (/Applications/Julia-0.6.app/Contents/Resources/julia/bin/julia in your case).

Also there should be a checkmark under each post (to the left of the heart). If you click that it will mark that post as the solution and the topic as solved.

1 Like

Brilliant stuff Kevin, I didn’t know!