leon
October 27, 2021, 12:29pm
1
I just reinstalled my Mac OS and Julia 1.7. I’m trying to add the path to Julia to my terminal.
Below is the instructions I found:
Copy and paste these two commands into your shell :
rm -f /usr/local/bin/julia
ln -s /Applications/Julia-1.7.app/Contents/Resources/julia/bin/julia /usr/local/bin/julia
I got the below error:
ln: /usr/local/bin/julia: No such file or directory
leon
October 27, 2021, 12:37pm
2
Found an answer myself. I’ll keep this question for future reference purposes.
PATH="/Applications/Julia-1.7.app/Contents/Resources/julia/bin/:${PATH}"
export PATH
1 Like
leon
October 27, 2021, 6:35pm
3
I just realize that for my above solution, I would need to type it every time before I launch Julia. What is a permanent solution?
I tried to add the below to my .profile file but it did not work:
export JULIA_HOME = /Applications/Julia-1.7.app
Many thanks!
You would need to update the PATH
in your shell profile.
For the ln -s
approach, you might need to create the /usr/local/bin
directory first, and you might need to use sudo
(which requests that you enter your password):
sudo mkdir -p /usr/local/bin
sudo ln -s /Applications/Julia-1.7.app/Contents/Resources/julia/bin/julia /usr/local/bin/julia
1 Like
leon
October 27, 2021, 6:59pm
5
Many thanks! This works great.