YouTip LogoYouTip

Julia Environment

Julia Language Environment Installation

The Julia language supports the following systems:

  • Linux
  • FreeBSD
  • macOS
  • Windows
  • Android

The Julia installation package download address is: https://julialang.org/downloads/.

Github source code address: https://github.com/JuliaLang/julia.

Domestic mirror address: https://mirrors.tuna.tsinghua.edu.cn/julia-releases/bin/

Package names corresponding to each system:

Operating System Package Name
Windows julia-1.7.2-win64.exe
Linux x86_64.tar.gz
Mac julia-1.7.2-mac64.dmg installer or julia-1.7.2-mac64.tar.gz binary file
FreeBSD julia-1.7.2-freebsd-x86_64.tar.gz

Image 1

Note: Whether the CPU is X86 or ARM can be checked via the uname -m command:

$ uname -m
x86_64

Installing on Windows System

Download the Windows Julia installer from https://julialang.org/downloads/.

Note: 32-bit Julia binaries can run on 32-bit and 64-bit Windows (x86 and x86_64), but 64-bit Julia binaries can only run on 64-bit Windows (x86_64). Nowadays, computers are basically 64-bit.

Run the installer, and just click Next during the installation process.

Check "Add Julia To PATH" to automatically add Julia to the environment variables.

Image 2

This way we can execute Julia commands in the terminal.

The default installation directory for Julia should be similar to C:UsersTUTORIALAppDataLocalProgramsJulia 1.7.2.


Linux/FreeBSD Installation

The following describes how to install using the binary package on Linux/FreeBSD systems. Download the binary package:

wget https://julialang-s3.julialang.org/bin/linux/x64/1.7/julia-1.7.2-linux-x86_64.tar.gz

The above is the download address provided by the official website. If the speed is slow, you can use the domestic mirror address to download:

wget https://mirrors.tuna.tsinghua.edu.cn/julia-releases/bin/linux/x86/1.7/julia-1.7.2-linux-i686.tar.gz --no-check-certificate

Extract:

tar zxvf julia-1.7.2-linux-i686.tar.gz

Linux/FreeBSD binaries do not need installation, but the system needs to be able to find the julia executable file, which requires adding the julia directory to the system environment.

After extraction, move the julia extracted directory to the /usr/local directory:

mv julia-1.7.2 /usr/local/

After moving, we can execute the Julia command using the full directory of julia:

# /usr/local/julia-1.7.2/bin/julia -v
julia version 1.7.2

The julia -v command is used to check the version number.

Julia uses the full path to call the executable file: /usr/local/julia-1.7.2/bin/julia -v

You can also add the julia command to your system PATH environment variable. Edit the ~/.bashrc (or ~/.bash_profile) file and add the following code to the last line:

export PATH="$PATH:/usr/local/julia-1.7.2/bin/"

After adding, execute the following command to make the environment variable effective immediately:

source ~/.bashrc

or

source ~/.bash_profile

This way we can directly execute the julia command without adding the full path:

# julia -v
julia version 1.7.2

macOS Installation

The following describes how to install using the binary package on macOS systems. Download the binary package:

wget https://julialang-s3.julialang.org/bin/mac/x64/1.7/julia-1.7.2-mac64.tar.gz

The above is the download address provided by the official website. If the speed is slow, you can use the domestic mirror address to download:

wget https://mirrors.tuna.tsinghua.edu.cn/julia-releases/bin/mac/x64/1.7/julia-1.7.2-mac64.tar.gz

Extract:

tar zxvf julia-1.7.2-mac64.tar.gz

macOS binaries do not need installation, but the system needs to be able to find the julia executable file, which requires adding the julia directory to the system environment.

After extraction, you can first rename the extracted package to julia-1.7.2:

mv julia-bf53498635 julia-1.7.2

After completion, move the julia-1.7.2 directory to the /usr/local directory:

sudo mv julia-1.7.2 /usr/local/

After moving, we can execute the Julia command using the full directory of julia:

$ /usr/local/julia-1.7.2/bin/julia -v
julia version 1.7.2

The julia -v command is used to check the version number.

Julia uses the full path to call the executable file: /usr/local/julia-1.7.2/bin/julia -v

You can also add the julia command to your system PATH environment variable. Edit the ~/.bash_profile file and add the following code to the last line:

export PATH="$PATH:/usr/local/julia-1.7.2/bin/"

After adding, execute the following command to make the environment variable effective immediately:

source ~/.bash_profile

This way we can directly execute the julia command without adding the full path:

$ julia -v
julia version 1.7.2
← Ml Model Optimization RegulariTag Template β†’