Data Dailies
๐Ÿ’พ Updated on May 28, 2020

In this second post (but really the first tutorial post), I walk through an opinionated way of setting up a Julia development environment on your local machine.... and of course provide links/guidance on alternate paths if you don't like my opinions (I'm not a monster).

Setting up a Julia environment

  1. Installation
    1. Mac OSX
    2. Windows
    3. Linux
    4. Vagrant/VirtualBox/Docker
  2. Editors and IDEs
  3. References and Extras

This guide is based on my personal preferences. See the margin notes (and references) for alternate approaches to setting up an environment

Installation

The official Julia distributions make the installation process reasonably seamless across a wide variety of platforms (compared to other scientific computing environments). What I walk through below is more of just a TLDR; of the official channels (plus or minus some convenience).

The following installation methods are most ergonomic if most of your development happens in a command line REPL (i.e. julia>).

For a more full service installation method, JuliaPro is the (slightly corporate) way to go.

Mac OSX

brew cask install julia

I prefer using Homebrew (vs. the Julia binaries) since it makes it faily easy to quickly update Julia to newer versions right from the command line without needing to download a new image file (and delete + move + symlink the binary each time).

Windows

Similar to Mac OSX, I present the package manager installation of Julia here (for the same reasons ๐Ÿ‘† as above). If you don't already have Chocolatey you will need to get it first.

Chocolatey is the Homebrew equivalent for Windows.
choco install julia --confirm
I haven't tested this Windows installation of the Julia package recently as I don't have easy access to a Windows OS. If someone does install Julia on Windows, feel free to edit this file and make a pull request.

Linux

While every Linux distribution historically has had its own package manager, it looks like there is a potentially cross distribution solution in snapcraft. The apt commands below are Debian/Ubuntu specific and have been tested with Ubuntu 18.04 LTS but the snap commands (and everything after) should be distribution agnostic. You can find a slightly outdated Julia on the snapcraft store.

While the snapcraft method may be more convenient, if you want the most recent Julia distribution you should download the official binaries from https://julialang.org
These commands should also should work in most server/cloud environments (i.e. AWS, Azure, Google Cloud, etc.)
hyphaebeast@linux:~$ sudo apt update; sudo apt install snapd
hyphaebeast@linux:~$ sudo snap install julia --classic
# NOTE: as of writing this installs Julia 1.0.4 (released June 2019)

hyphaebeast@linux:~$ julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.0.4 (2019-05-16)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia>

Vagrant/VirtualBox/Docker

vagrant init hashicorp/bionic64
vagrant up
vagrant ssh

These commands get a Ubunutu VM setup using Vagrant on your local machine. Once you vagrant ssh into the VM, follow the instructions ๐Ÿ‘† for installing Julia on Linux.

Regardless of which installation method you chose, as long as you can start the Julia REPL[1] in a terminal everything should be gravy.....
[1] $ julia>

Editors and IDEs

Editors and IDEs are the more personal development choices to make (and often there is little objective reason to choose one over the other). I personally use Visual Studio Code for most of my other development and there is a decent Julia extension for it.

Some folks are very partial to a notebook like experience. For that go with IJulia for Jupyter/IPython.

The most full featured/RStudio like (but most Julia specific) IDE is Juno[2].

[2] This is what comes bundled with JuliaPro.

References and Extras

CC0
To the extent possible under law, Jonathan Dinu has waived all copyright and related or neighboring rights to Getting Setup with Julia.

This work is published from: United States.

๐Ÿ”ฎ A production of the hyphaebeast.club ๐Ÿ”ฎ