Julia Environment Setup

Installing Julia on your preferred OS

Adarsh Ms
3 min readSep 2, 2020

This draft covers installation of Julia on ubuntu (version used for this setup — 20.04) and choosing an IDE for it.

This is part 2 of the Julia Tutorials (a series of tutorials on Julia).

Feel free to check out the complete series @ —

Installing Julia binary

Julia offers portable binary distributions for windows, MacOS, Linux and Free BSD. You can download the binary distribution for your OS from https://julialang.org/downloads/. Julia offers at most four active branches, namely master, unstable, stable, and LTS.

Apart from binaries, Julia also provides docker images and JuliaPro (by Julia Computing), which includes Julia and the Juno IDE, along with access to a curated set of packages for plotting, optimization, machine learning, databases and much more. You have to follow a registration process to download JuliaPro.

I would suggest you download binaries from either the stable or LTS (If you don’t want to update often) branch or go for JuliaPro.

Note: For installation on non-linux distributions, follow this link: https://julialang.org/downloads/platform/

  • Step 1: Download your binary of choice (LTS binary is used here)
wget https://julialang-s3.julialang.org/bin/linux/x64/1.0/julia-1.0.5-linux-x86_64.tar.gz
  • Step 2: Extract the tarball to a preferred location
tar -C /path/to/juliadir -xvzf julia-1.0.5-linux-x86_64.tar.gz
  • Step 3: Now add Julia to your system path. Let’s do that by adding Julia bin path to the end of your ~/.bashrc or ~/.bash_profile.
nano ~/.bashrc
export PATH=”$PATH:/path/to/juliadir/bin”
  • Step 4: For the changes to take effect let’s source the file.
source ~/.bashrc

All done 🎉🎉 now let’s see if we are able to invoke Julia’s REPL, type the following in your terminal

julia

If all the steps were followed correctly, you should now see a screen similar to below:

Setting up IDE for Julia (optional)

Note: You can skip this part if you’ve installed JuliaPro, since it includes Juno IDE (an IDE based on Atom).

Julia support various editors like VSCode, Atom, Emacs, Sublime, Vim, Notepad++ and IDEs like IntelliJ.

Atom
If Atom is not installed in your system, follow the instructions given at https://atom.io/

Head over to the package installation settings and search for uber-juno and click the install button. Once installed, try opening the REPL with Juno > Open REPL or Ctrl-J Ctrl-O (Cmd-J Cmd-O on macOS), and then press Enter in the REPL to start a Julia session.

VSCode
If VSCode is not installed in your system, follow the instructions given at https://code.visualstudio.com/

Inside VS Code, go to the extensions view either by executing the View: Show Extensions command (click View->Command Palette...) or by clicking on the extension icon on the left side of the VS Code window.

In the extensions view, simply search for the term julia in the marketplace search box, then select the Julia extension and click the install button.

You might have to restart VS Code after this step.

If the extension does not find your Julia installation automatically, or if you want to use a different Julia installation than the default one, you can set the julia.executablePath to the full path of Julia executable that the extension should use. In that case the extension will always use that version of Julia. To do this, follow the below steps:

  • execute the Preferences: Open User Settings command (you can also access it via the menu File->Preferences->Settings),
  • And then make sure your user settings include the julia.executablePath setting and update the full path to your Julia executable.

Note: If steps for an IDE of your choice is not listed here, follow the above specified official links corresponding to your IDE.

--

--

Adarsh Ms

A passionate engineer who thrives on using programming languages to converse with machines.