Julia 101

Lesson 2: Setting Up Your Environment

MUHAMMAD SALMAN KABIR
3 min readApr 25, 2021
Julia  for VSCode

As the subtitle suggests, this lesson discusses the installation of Julia on a windows machine. Currently stable and Long Term Support (LTS) releases of Julia are available on its official webpage. Follow below mentioned steps to download and install.

  1. Go to https://julialang.org/downloads/
  2. Grab the currently stable or LTS release depending upon your system architecure i.e. 32 bit or 64 bit
  3. After downloading, double click on installer package and follow the instructions to finish installation.
  4. Once installation is complete, fire up Command Prompt, type julia and hit Enter. If everything is installed correctly, Julia REPL will be opened and we are good to go.

A shortcut icon will also be available to you to launch Julia REPL, directly from your desktop or Start Menu. We can now, write our first program and as usual, it is “Hello World!”

print("Hello World!")

Before diving deep into coding, let’s take a deep breath and we look into available IDEs, we can use, to increase our productivity. Julia provides us a number of options here. Some popular ones are:

  1. Juno: Atom Plugin
  2. VS Code Extension
  3. Jupyter Notebook
  4. Pluto

In future lessons, we are going to use either VS Code or Jupyter Notebook to write our programs. Details for setting them up, goes here:

VS Code

  1. Start VS Code.
  2. 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.
  3. In the extensions view, simply search for the term julia in the marketplace search box, then select the extension named Julia and click the install button. You might have to restart VS Code after this step.
Julia setup in VS Code

Jupyter Notebook

Run Julia REPL, either by using Command Prompt or Start Menu and at the julia> prompt, press ] , type hit add IJuliaand hit Enter.

If you already have Python/Jupyter installed on your machine, this process will also install a kernel specification that tells Jupyter how to launch Julia. You can then launch the notebook server the usual way by running jupyter notebook in the terminal.

Alternatively, you can have IJulia create and manage its own Python/Jupyter installation. To do this, type the following in Julia, at the julia> prompt:

using IJulia
notebook()

to launch the IJulia notebook in your browser. The first time you run notebook(), it will prompt you for whether it should install Jupyter. Hit enter to have it use the Conda.jl package to install a minimal Python+Jupyter distribution (via Miniconda) that is private to Julia (not in your PATH).

IJulia Installation

Thats all for this lesson. Stay tune for next:)

--

--

MUHAMMAD SALMAN KABIR
MUHAMMAD SALMAN KABIR

Written by MUHAMMAD SALMAN KABIR

Electrical Engineer | Signal Processing & Machine Learning Enthusiast

No responses yet