Installing Julia


Installing Julia

Please follow the installation instructions to install Julia on any Operating System.

Installing Neuroblox

First create a folder where you will keep all course material, that is notebooks and the Julia environment, holding all necessary packages for the course. To install Neuroblox.jl along with all other Julia packages that we will need for this course, start a Julia session in your course folder, e.g. type julia in a Terminal window after installing it from the instructions above, and run the following commands

using Pkg
using Downloads

Downloads.download("raw.githubusercontent.com/Neuroblox/course/refs/heads/main/Project.toml", joinpath(@__DIR__, "Project.toml"))
pkg"registry add General" # add the Generl Registry, necessary to work with NeurobloxRegistry if this is the first time opening Julia
pkg"registry add https://github.com/Neuroblox/NeurobloxRegistry"; # add the Neuroblox Registry to the Julia registries to have access to Neuroblox.jl
Pkg.activate(@__DIR__) # activate a Julia environment at your current directory
Pkg.instantiate() # download all packages listed in the Project.toml we downloaded above

Project.toml is a file containing a list of packages, sometimes with specified versions or version bounds. When we Pkg.instantiate() an environment at a directory that includes a Project.toml then all listed packages are installed at their most suitable versions.

Using Jupyter Notebooks

All course sessions exist as webpages on this site and as interactive Jupyter notebooks. Using the notebooks is the recommended way of working through the course material. In notebooks we can evaluate individual code blocks, make changes to them and reevaluate their output and add new code blocks.

Please follow the link below to download a folder containing all Jupyter notebooks for the course and add the folder in the same directory that you instantiated the Project.toml above.

Click the link and then download the notebooks folder : notebooks download link

To open a notebook, first start a Terminal (or Command Prompt) session in the same directory as above. Then run the following command

julia --project="." -e "using IJulia; notebook(dir = pwd());"

NOTE: The first time that you run this command IJulia will ask you if you want it to install Jupyter, please confirm this to proceed.

This will start a local Jupyter server on your browser. On this new Jupyter tab that will open, navigate to your directory in the /notebooks/ folder and choose a notebook to open. All notebook files have the .ipynb extension.

CC BY-SA 4.0 Neuroblox Inc. Last modified: January 16, 2025. Website built with Franklin.jl and the Julia programming language.