First Steps #1: Installing Julia

This is post #1 in our First Steps series. Want to learn Julia but don't know where to start? Start here!

First Steps #1: Installing Julia
Download icon

💻 Installing Julia

The recommended method of installing Julia is through the official binaries available at https://julialang.org/downloads/.  Simply choose the proper link for your platform.


My Platform is...

🍎 macOS

  1. Double-click the .dmg file and drag "Julia-1.8" into "Applications".
  2. In the Applications folder, double-click "Julia-1.8" and voila 🎉!
  3. Optional: Add julia to your PATH environmental variable.  This means you can start Julia by typing julia in a terminal (like Terminal.app that ships with every Mac).  Copy and paste these two commands into your shell:
rm -f /usr/local/bin/julia

ln -s /Applications/Julia-1.8.app/Contents/Resources/julia/bin/julia /usr/local/bin/julia
Adding julia to macOS PATH
Note: If your mac has an M-series processor, you may want to consider downloading both the Intel/Rosetta and the M-series releases of Julia. If you run into a package that doesn't work on your M-series processor, you can then switch to the Intel/Rosetta version.

4. Optional for M-series macs: Add juliarosetta to your PATH.  First, rename the Julia-1.8 (Intel version) Application to Julia-1.8-Rosetta.

rm -f /usr/local/bin/juliarosetta

ln -s /Applications/Julia-1.8-Rosetta.app/Contents/Resources/julia/bin/julia /usr/local/bin/julia
Adding juliarosetta to macOS PATH

🪟 Windows

  1. Double-click the .exe file and follow the instructions.
  2. Find Julia via the start menu or double-click the Desktop shortcut (if you chose to add one during step 1) and voila 🎉!
  3. Optional: Add julia to your PATH environmental variable.  This means you can start Julia by typing julia in a terminal (it is recommended to use a modern terminal such as Windows Terminal from the Microsoft App Store.  The easiest method is to check the "Add Julia to PATH" option in the installer.  If you skipped that, the instructions slightly differ for Windows 7 and 8 vs. Windows 10.

🐧 Linux/FreeBSD

Odds are you expect less hand-holding 😄.  See available versions here: https://julialang.org/downloads/.


🎁 Packages for Data Science

Installing Packages

Julia comes with an amazing package manager.  Pkg will be covered in a different post.  For now we'll just say that to add a package (StatsBase, for example), you'll use:

julia> using Pkg

julia> Pkg.add("StatsBase")
Installing StatsBase

Core Data Science Packages

There are many fantastic data science tools in Julia's package ecosystem.  Many of them will be covered in future posts.  For now, we recommend getting started with the following:

  • StatsBase: Basic Statistics for Julia.
  • DataFrames: In-memory tabular data in Julia.
  • Plots: Powerful convenience for Julia visualizations and data analysis.
  • Pluto: Simple reactive notebooks for Julia.

To install these packages, run the following in Julia:

using Pkg

for pkg in ["StatsBase", "DataFrames", "Plots", "Pluto"]
    Pkg.add(pkg)
end
Installing Core Data Science Packages

🚀 That's It!

Next up is First Steps #2: The REPL

Enjoying Julia For Data Science?  Please share us with a friend and follow us on Twitter at @JuliaForDataSci.