Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

install julia language [closed]

Tags:

macos

julia

I use a Mac running Mountain lion.

When I finish installing the Julia from https://github.com/JuliaLang/julia , i could not understand this:

Once it is built, you can either run the julia executable using its full path in the directory created above, or add that directory to your executable path so that you can run the Julia program from anywhere (in the current shell session):

In bash:
export PATH="$(pwd):$PATH"

So now, every time in terminal, i could only use cd Julia, and then ./Julia to open Julia.

like image 302
bifurcat Avatar asked Oct 27 '25 20:10

bifurcat


2 Answers

export PATH="$(pwd):$PATH" is only correct when you are in the julia source directory. When you open a new shell, you are back to your $HOME.

In order to set default settings, you need to edit your ~/.bash_profile and append to the path like so:

export PATH="path/to/julia/bin:$PATH"

If all this seems quite obscure, you'll have to follow an introduction to the shell (bash).

like image 74
lgautier Avatar answered Oct 30 '25 12:10

lgautier


All this instruction is saying is that instead of having to type in: "cd Julia" and "./Julia", if you add the executable path to your ".bashrc" file (it's an invisible dot file in your home directory), then all you would need to type in at the command line prompt in Terminal is "Julia" (i.e. no "./" path specifier) and the Julia app or environment would launch.

If you can open your ".bashrc" file, look for that "export PATH" line and at the beginning or end of the actual path (between the quotes), add the directory to your Julia executable.

For example, on my machine it might be:

export PATH="$(pwd):/Users/dautermann/Julia/:$PATH"

Here is some additional information on Superuser about the .bashrc file. I hope this helps you!

like image 39
Michael Dautermann Avatar answered Oct 30 '25 12:10

Michael Dautermann