Installation
Download and Install
You can install the julia language interpreter from its official site julialang.org
The Easy Way
Linux
Download the latest binary version, unpack and link the binary file (path/to/julia-1.x.x/bin/julia) to your system path
sudo ln -s /path/to/julia-1.x.x/bin/julia /usr/bin/julia
Check your installation by typing julia
in your shell.
Mac OS
Download the .dmg
file, click and install. You may also want to set the path
Windows
Follow the offical guide.
The Hard Way (From Source)
Build from source
Build julia from source will help you enable some platform related optimizations. First, clone julia master branch
$ git clone https://github.com/JuliaLang/julia.git
Build stable version (using v1.0.0 as an example)
$ cd julia
$ git checkout v1.0.0
Add this to Make.user file
prefix=/home/YOUR_USERNAME/.virtualenvs/julia-stable
$ make && make install
The Hardest Way (using Virtual Environment, shall we remove this part? @Roger)
If you don't care dependencies, Julia itself contains a environment manager for its own packages, you can just install your Julia program to global scope of the system.
Setup your Julia Environment
For \nix users*
If you want to use virtualenv to control julia binaries and compile it with other languages in the future. I suggest you hatch, a modern project, package, and virtual env manager.
To install hatch, you need Python3.5+
$ pip3 install --user hatch
create a virtualenv by the following command
$ hatch env julia-stable
From binary file
download from julialang.org and extract your binary file, it has the following structure
.
├── bin
├── etc
├── include
├── lib
├── LICENSE.md
└── share
then move these files into related folder
.virtualenv/julia-stable/
with the same structure:
julia/bin => .virtualenv/julia-stable/bin
julia/etc => .virtualenv/julia-stable/etc
etc.