I use Julia as my main programming language for my scientific research. I code in Julia in an interactive way using IJulia notebooks. An IJulia or Jupyter notebook works with same philosophy as a Mathematica notebook. It’s only better because is is free and open source! In this post, I am summarizing how you can install Julia and setup your workflow for using IJulia.
First, install Julia from its website. Use the link for the latest version compatible with Apple M1 processor. The current version I installed is Julia 1.7. It’s as simple as extracting the app ins copying it to the application folder.
You can run Julia like any other app from from the application folder or the spotlight search. It opens Julia in the terminal app. If you will need to run it directly from the terminal, create an alias to run the executable in your bash or zsh profile. I use zsh and I simply appended my .zshrc file with the following line:
alias julia="/Applications/Julia-1.7.app/Contents/Resources/julia/bin/julia"
Next, you need to install package IJulia using Pkg. Follow the instructions at the official IJulia page. IJulia allows you to run Julia in as a notebook in the browser. This way of working with Julia is similar to running Python using IPython on Jupiter Notebooks. The package installer Pkg of Julia also installs miniconda and Jupiter within Julia along with many other dependencies. Familiarize yourself with Pkg as you will need it to install many packages you need for your projects.
To open a IJulia notebook, run the command:
using IJulia; notebook()
This will open a window in your default browser where you can open or create an IJulia notebook. Happy coding!