Installing Julia
Contents
Install Julia locally to your $System
This article covers the local installation of Julia using packages from the Download Page. Other options for using Julia include an Online REPL, a Docker image, and a Desktop Julia IDE.
Installs can either be without sudo/admin USER or GLOBAL. For context, most other programming languages default to being installed with GLOBAL scope. Choose one and follow the instructins for that target.
Installation
Windows
-
(Windows 7/Server 2012 only): Enable Windows Management Framework 3+
-
Open the executable with Admin Privileges
-
GLOBAL | Change the install directory to
%PROGRAMFILES%/Julia
. -
Hit Install > Hit Finish
-
GLOBAL | Using Powershell with Admin Privileges, add julia permanently to your path
1 2 3 4 5 6 7
$PATH = [Environment]::GetEnvironmentVariable("PATH") $julia_path = "C:\Program Files\Julia" # -DO THIS- For all users on this machine [Environment]::SetEnvironmentVariable("PATH", "$PATH;$julia_path", "Machine") # -OR THIS- For just me [Environment]::SetEnvironmentVariable("PATH", "$PATH;$julia_path")
-
USER | Alias
julia
in your $Profile. If you do not have a profile, Set one up.1 2
$julia_path = $home\AppData\local\Julia-1.1.0\bin\julia Add-Content -Path $Profile -Value "function julia { Invoke-Expression $julia_path }"
Macos
-
Get brew if not installed
-
GLOBAL |
brew cask install julia
-
USER | Download, un/mount dmg, install to ~/Applications, add julia it to PATH
1 2 3 4 5 6 7 8 9 10 11 12 13
#!/usr/bin/env bash curl https://julialang-s3.julialang.org/bin/mac/x64/1.1/julia-1.1.0-mac64.dmg \ -o /tmp/julia-1.1.0.dmg hdiutil attach /tmp/julia-1.1.0.dmg mkdir -p ~/Applications cp -r /Volumes/Julia-1.1.0/Julia-1.1.app ~/Applications/Julia-1.1 ln -s ~/Applications/Julia-1.1/Contents/Resources/julia/bin/julia ~/Applications/julia hdiutil detach /Volumes/Julia-1.1.0 if [[ ":$PATH:" != *":$HOME/Applications:"* ]]; then echo "export PATH=$PATH:$HOME/Applications" >> ~/.profile source ~/.profile fi
Linux
-
Download the binary, depending on your architecture
1 2 3 4 5 6
# Download 64-bit curl https://julialang-s3.julialang.org/bin/linux/x64/1.1/julia-1.1.0-linux-x86_64.tar.gz \ -o /tmp/julia.tar.gz # Or 32-bit curl https://julialang-s3.julialang.org/bin/linux/x86/1.1/julia-1.1.0-linux-i686.tar.gz \ -o /tmp/julia.tar.gz
-
GLOBAL | Download, extract, and copy to /opt/local, add to PATH
1 2 3 4 5 6 7
tar -C /tmp -xzf /tmp/julia.tar.gz cp -r /tmp/julia /opt/local if [[ ":$PATH:" != *":/opt/local:"* ]]; then echo "export PATH=$PATH:/opt/local" >> ~/.profile source ~/.profile fi
-
USER | Download, extract, copy to ~/bin, and add to PATH
1 2 3 4 5 6 7 8
tar -C /tmp -xzf /tmp/julia.tar.gz mkdir -p ~/bin cp -r /tmp/julia ~/bin if [[ ":$PATH:" != *":~/bin:"* ]]; then echo "export PATH=$PATH:~/bin" >> ~/.profile source ~/.profile fi
Verification
Open a new shell to make sure julia==1.1.0 is installed correctly
Bash
Powershell
Next Steps
Now that you have Julia, install some packages!