Skip to content

Julia Installation

This chapter guides you through installing the Julia programming environment on different operating systems.

Download Julia

Visit the Julia official download page: https://julialang.org/downloads/

Choose the version suitable for your operating system:

  • Windows (64-bit)
  • macOS (Intel or Apple Silicon)
  • Linux (various distributions)

Windows Installation

Method 1: Official Installer

  1. Download the .exe installer
  2. Double-click to run the installer
  3. Follow the wizard to complete installation
  4. Recommended: Check "Add Julia to PATH" option

Method 2: Using winget

powershell
winget install julia -s msstore

Method 3: Using Chocolatey

powershell
choco install julia

Verify Installation

Open Command Prompt or PowerShell and enter:

powershell
julia --version

If the version number is displayed, installation was successful.

macOS Installation

Method 1: Official Installer

  1. Download the .dmg file
  2. Double-click to open, drag Julia to Applications folder
  3. Add environment variable in terminal (optional):
bash
# Add to ~/.zshrc or ~/.bash_profile
export PATH="/Applications/Julia-1.10.app/Contents/Resources/julia/bin:$PATH"

Method 2: Using Homebrew

bash
brew install julia

Verify Installation

bash
julia --version

Linux Installation

Method 1: Official Binary Package

bash
# Download (example: version 1.10.0)
wget https://julialang-s3.julialang.org/bin/linux/x64/1.10/julia-1.10.0-linux-x86_64.tar.gz

# Extract
tar zxvf julia-1.10.0-linux-x86_64.tar.gz

# Move to appropriate location
sudo mv julia-1.10.0 /opt/

# Create symbolic link
sudo ln -s /opt/julia-1.10.0/bin/julia /usr/local/bin/julia

Method 2: Using Package Manager

Ubuntu/Debian:

bash
sudo apt install julia

Fedora:

bash
sudo dnf install julia

Arch Linux:

bash
sudo pacman -S julia

Verify Installation

bash
julia --version

Starting Julia

After installation, you can start Julia in the following ways:

Command Line Startup

bash
julia

This will start Julia's interactive environment (REPL):

               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.10.0 (2023-12-25)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia>

Running Script Files

Create a .jl file and run:

bash
# Create script
echo 'println("Hello, Julia!")' > hello.jl

# Run script
julia hello.jl

Development Environment Setup

VS Code Configuration

  1. Install VS Code
  2. Install Julia extension: Search "Julia" and install the official extension
  3. Configure Julia path (if needed)

VS Code Julia extension provides:

  • Syntax highlighting
  • Code completion
  • Integrated REPL
  • Debug support
  • Plot display

Jupyter Notebook Support

Install IJulia in Julia REPL:

julia
using Pkg
Pkg.add("IJulia")

After this, you can use Julia kernel in Jupyter Notebook.

Package Manager

Julia includes a powerful built-in package manager called Pkg.

Enter Package Mode

Press ] in REPL:

julia
julia> ]
(@v1.10) pkg>

Common Commands

julia
# Add package
pkg> add PackageName

# Remove package
pkg> rm PackageName

# Update packages
pkg> update

# View installed packages
pkg> status

# Exit package mode
# Press Backspace or Ctrl+C

Using Pkg in Code

julia
using Pkg

# Add package
Pkg.add("Plots")

# Use package
using Plots
PackagePurpose
PlotsData visualization
DataFramesData processing
CSVCSV file I/O
HTTPNetwork requests
JSONJSON parsing
FluxMachine learning
DifferentialEquationsODE solving

Environment Variables

JULIA_DEPOT_PATH

Specify storage location for Julia packages and other data:

bash
export JULIA_DEPOT_PATH="$HOME/.julia"

JULIA_NUM_THREADS

Set number of threads Julia uses:

bash
export JULIA_NUM_THREADS=4

Or specify at startup:

bash
julia -t 4

Common Issues

1. Command Not Found

Ensure Julia is added to system PATH.

2. Package Installation Failure

Try updating package registry:

julia
pkg> registry update

3. Slow Compilation

First package load is slow (requires precompilation), subsequent uses are much faster.

Next Steps

After completing installation, continue learning:

Content is for learning and research only.