First Steps #1: Installing Julia

By: Josh Day

Re-posted from: https://www.juliafordatascience.com/first-steps-1-installing-julia/

💻 Installing Julia

First Steps #1: 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.6" into "Applications".
  2. In the Applications folder, double-click "Julia-1.6" 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.6.app/Contents/Resources/julia/bin/julia /usr/local/bin/julia
Adding julia 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 😃.  Click the above link ☝️.

🎁 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!

You're ready to go 🚀.

Next up is First Steps #2: The REPL