Can not open Julia from the Terminal

I am looking at the Warp terminal and Julia programming. Currently one starts Julia by double clicking, and it then starts the REPL in the Mac Terminal. To open from the Terminal the common answer that I find on the internet is the following path change:


sudo ln -s /Applications/Julia-0.5.app/Contents/Resources/julia/bin/julia /usr/local/bin/julia


However I can not get this to work. I think that I got an error about ln if I remember correctly from last night. It had been a long day, and I had just started the Julia Academy courses.


Along with this, I would also like to try working with the Warp Terminal Emulator and there would more path changes.


I also tried temporary path changes and the export command was not accepted.

Have I run into even more Apple security? Will I have to go root? Or will I have to build Julia from scratch in the terminal from Github or Homebrew?


Running Ventura 13.3.1, zshell on my iMac

3.6 GHz Quad-Core Intel Core i7





iMac 21.5″ 4K

Posted on Apr 20, 2023 6:06 AM

Reply
Question marked as Top-ranking reply

Posted on Apr 20, 2023 6:57 AM

I just now downloaded Julia and did the steps correctly, and it works.


Downloaded the current version 1.8.5 from julialang.org


The application name is Julia-1.8


The sudo command - correct for this version - is


sudo ln -s /Applications/Julia-1.8.app/Contents/Resources/julia/bin/julia /usr/local/bin/julia



I already have /usr/local/bin in my path, so now I just type


julia



and it works.


Similar questions

16 replies
Question marked as Top-ranking reply

Apr 20, 2023 6:57 AM in response to danuke

I just now downloaded Julia and did the steps correctly, and it works.


Downloaded the current version 1.8.5 from julialang.org


The application name is Julia-1.8


The sudo command - correct for this version - is


sudo ln -s /Applications/Julia-1.8.app/Contents/Resources/julia/bin/julia /usr/local/bin/julia



I already have /usr/local/bin in my path, so now I just type


julia



and it works.


Apr 20, 2023 6:52 AM in response to danuke

The suggestion you got is a good one, but you need to take care of a few details.


Do you get any error message when you do


sudo ln -s /Applications/Julia-0.5.app/Contents/Resources/julia/bin/julia /usr/local/bin/julia


What exactly, if any?


It may be that /usr/local/bin does not yet exist, in which case you need to create it first.


And it may be that your version of Julia app is different, in which case you should amend the command accordingly - the current version seems to 1.8.5, so much more recent than 0.5


If the sudo command works without any error, the next step is to ensure that /usr/local/bin shows up in your PATH


Does it work from Terminal if you type the full path:


/usr/local/bin/julia


?

Apr 20, 2023 11:12 AM in response to Luis Sequeira1

Well, heck(in a good way).

I uninstalled the Homebrew Julia, and reinstalled Julia from their site. Of course not wanting to reinvent the wheel, I copied and pasted your line and it worked after saying no to .julia. and it works in both versions of terminal. Thank you for taking the time to verify things and help me out. I wonder why it does not show up in my path now?

Apr 20, 2023 11:31 AM in response to danuke

danuke wrote:

Well, heck(in a good way).
I uninstalled the Homebrew Julia, and reinstalled Julia from their site. Of course not wanting to reinvent the wheel, I copied and pasted your line and it worked after saying no to .julia. and it works in both versions of terminal. Thank you for taking the time to verify things and help me out. I wonder why it does not show up in my path now?


I am glad that it is working.


What does not show up in your path?


You previously had posted this:


% echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin



and that is fine.


Apr 21, 2023 8:12 AM in response to danuke

danuke wrote:

What? Homebrew worked. It installed Julia. Most of those dependencies were being used for things that I had in play for QGIS and Ortho4Xplane and were due for an update anyway. What I do not understand is why that command line that I copied, there was a copy "button" associated with it, and changed the version to match the application did not work when I tried it last night. I got messages from not being authorized to not a valid command. But today when I copied it here, it worked fine.

Short cuts make long delays - Peregrin Took


I regularly see people post on these forums about strange problems on the command line. Invariably, Homebrew eventually always enters the chat.


Homebrew and other package managers aren't much different than the AI chatbots that have recently started to infect this forum and elsewhere. They can be useful to perform a certain amount grunt work. But the trick is, you always have to double-check them. I've seen people spend $100,000 on new hardware just because they were running the wrong version of a tool like this.

Apr 20, 2023 6:42 AM in response to danuke

Is there anything on the Julia site that instructs you to perform that softlink syntax? The ownership of /usr/local/bin should be:


sudo chown $(id -un):admin /usr/local/bin


Everytime that you update the Julia application to another version, you will need to redo the softlink. I don't use Julia and in fact, never heard of it.


If you can avoid it, you should not install Julia from homebrew as the dependencies are enormous:


Apr 20, 2023 11:56 AM in response to etresoft

What? Homebrew worked. It installed Julia. Most of those dependencies were being used for things that I had in play for QGIS and Ortho4Xplane and were due for an update anyway. What I do not understand is why that command line that I copied, there was a copy "button" associated with it, and changed the version to match the application did not work when I tried it last night. I got messages from not being authorized to not a valid command. But today when I copied it here, it worked fine.

Apr 20, 2023 10:47 AM in response to Luis Sequeira1

Thank you for your reply.

I did indeed change to the current version.

here is my path

% echo $PATH

/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin


I seem to recall something about ln not being recognized. I supposed that I can go back and brew uninstall it and try again. I even tried the Ventura path example for a temporary change using export if I remember that correctly and that was not accepted, export was not recognized.

Apr 20, 2023 12:04 PM in response to Luis Sequeira1

Well, the application just opens the terminal. And when I ran the sudo ln -s and entered my password it just accepted it, paused and fell on through to the next line. No messages or responses. All this bother is because it appears that the course I am looking into involves some terminal access also and the instructor made some bad assumptions.

Apr 21, 2023 5:53 AM in response to Luis Sequeira1

Indeed, thanks to your help. Still puzzled about the night before last. That is why one copy did not work and yet another did? OH well. Just as you said, it is all fixed now. I do remember using version 1.8.5 rather than 1.8, so I do not know if that made a difference or if there was something else wrong in the 2 year old copy.


Thank you to all.

May 18, 2023 8:42 AM in response to etresoft

To risk sounding like a skipping record, I have not had issues with Homebrew. Actually, I think that the Homebrew issues are a result of folks not carefully reading the instructions, and updating; the same with python wheels. For sure and for certain, Homebrew is not a download and forget, nor is it a download and not pay attention to what is going on.

Things were working just fine with the Homebrew download, but I am always ready to go back and try something else (say as intended in the first place?), but I did get some benefits from the download as mentioned. Heck, I often experiment with Homebrew. I am retired and have time (well until they found this aortic aneurism a while back).

I do believe as, mentioned above, that my boo boo was in using a 3 digit version number vise a 2 digit version number in the edit that Luis did.


AI chatbots, now that is news to me. I guess that once again you will need to educate me there etre. The reason that I am looking into Juila is that I think that it is or will be the kingpin/mother/uber language of AI. And I am somewhat of a ludditeaphobe of AI. I see terminators lurking in the shrubbery whispering Ni.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Can not open Julia from the Terminal

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.