Hi all,
I’m using MacBook and after the last update (Sequoia 15.3.1) when I try to open Julia I get the error:
" “julia” can’t be opened because Julia is not allowed to open documents in Terminal."
I believe this is related to security permissions, but I haven’t been able to find a solution.
Has anyone else encountered this issue and managed to resolve it?
But a .dmg file from the link you shared should also be fine. juliaup makes it easier to quickly switch Julia versions, so it would be easier to check if a different version perhaps does not have this problem.
Not sure if this tip will help in this particular circumstance, but…
When you get an error message from macOS related to security permissions, if you immediately open “System Settings…”, go to the “Privacy & Security” preference pane, and scroll down to the section that says “Security”, there will often be a message there mirroring the error you just got with a button you can click to grant the needed permissions.
Yes absolutely. It would be really good @suski if you’d edit your post since people will pick this up and encounter other errors in future related to “sudo installing” into the home folder. Also, never ever do sudo execution of any script on the internet, ever.
To sum up, there are two main ways of installing Julia on macOS:
Using juliaup, which is the recommended way and it’s the also the very first method at the top of the Download Julia page. It only requires to execute curl -fsSL https://install.julialang.org | sh in the terminal, no sudo!
Manually installing using the DMG image file, which might need you to go to the System Settings and grant additional access to the executable, as pointed above by @jballanc In my opinion, this method should be discouraged, unless people know what they are doing.
This still doesn’t work for me when I install from DMG - the system settings doesn’t show me an error message or a place where I can grant permissions to the application. juliaup doesn’t install the Julia.app Mac application itself into the /Applications folder as the DMG installer does, it just manages a local copy of the julia binary. The Mac app used to work and would launch the binary in a new Terminal window. What is the recommended way to get the Julia.app application itself to install and run from the Finder?
There are some misconceptions (probably related to bad documentation) about what you get when you install Julia. If you ask me, the DMG method is a total failure, it simply should not exist. People who want to develop code, need to be forced to use the terminal, at least to an extent, so that they understand what’s happening.
Installing Julia is totally easy and just like every other (terminal) application, it usually comes with (at least) one binary, which has to live in a folder that is listed in your PATH environment variable, since that is one of the places where your shell searches for when you type in something and press enter, like julia<enter>. Every serious developer has at least one terminal window open at all time: there is no need to create double-clickable-icons “to launch a language”. I think this is the root of all evil when it comes to newcomers. I could sing a song about Python IDLE…
The juliaup installer does everything for you. It downloads Julia in ~/.julia and modifies the shell configuration file so that future(!) shell processes (i.e. whenever you open a new terminal tab/window in future), the julia command is in your PATH and you will enter the Julia REPL when you run that command.
There is really not more magic going on and nobody should do anything else to install Julia on any system. This is just it, a single command in the terminal.
The DMG installation method is just a pain in the youknowhere and unfortunately it’s also the preferred method for people who are not comfortable with the terminal/shell, so it’s basically a double shot in both feet and knees. If I had something to say, I’d definitely remove the DMG distribution from the downloads page
If you want to launch Julia from the command line, first open a new terminal window, then run the following snippet from your shell (e.g., using the Terminal app, not inside the Julia prompt).
Those who chose different pathway after such a clear recommendation are either experts knowing what they are doing (for those adding to PATH is optional), or newbies looking for trouble and gathering experience the hard way. Well, their own choice. Learning a bit about how unixes work could be quite useful anyway.
It worked, and presumably still works. Just you have to add Julia manually to PATH, maybe set up path in the VScode, and, for newer macOS versions, deal with security permissions, for which you might need an admin account. There might be some use cases for DMG installer however.
Yes, that’s the use case. I already know how to install Julia (with or without the DMG) and run it from the Terminal. The current DMG installer does not work: it installs an app, but that app cannot be launched from the Finder. This used to work (it launched the Terminal and Julia from there.) If Julia doesn’t want to support Julia.app as a GUI application or wants you to write your own, fine, but then they shouldn’t have the DMG install one in the first place - this is just a broken user experience on the Mac.
I have completely switched to juliaup installation a while ago, but as far as I remember, a double-click onto Julia app installed through DMG just opened the terminal window with a Julia process. Which GUI do you mean?
Double-clicking on the app installed from the DMG used to open Julia in a new Terminal window from the Finder (GUI), but now gives the error I described earlier.
OK, I’ve downloaded a DMG, installed Julia, and indeed got the message from the system:
“julia” can’t be opened because Julia is not allowed to open documents in Terminal.
or
“julia” can’t be opened because Julia is not allowed to open documents in Terminal.
(got a different message on the second attempt).
BTW for a person looking for help, providing details like the exact message from OS improves the chances
The issue is probably due to a known bug by Apple. There might be some workarounds, but I don’t see it being worth the trouble, juliaup being available. The bug exists only in relatively new versions of macOS, thus the DMG approach is probably usable on older installations.
On a more serious note, Julia development and distribution is a free service to the community done without a backing by a Google, Microsoft, or like. There is no evil will, just chronically limited resources.
Still, in this case, at least a warning should be provided on the download page.