Download and Installation

OSCAR is currently under heavy development, so all parts change continuously. If you encounter any trouble while following the steps outlined below, feel free to contact us via GitHub discussion, our issue tracker, or by sending an email to oscar@oscar-system.org.

Step 1: Install prerequisites

The following instructions assume that you are at least somewhat familiar with using a terminal interface.

The installation steps (specifically the precompliation) requires at least 6GB of free memory.

Windows Please install Windows Subsystem for Linux (WSL) following the official instructions. You should now have an App "Ubuntu" in your start menu (run "explorer.exe ." in the Ubuntu terminal to open the current folder in the Windows File Explorer). You can now follow the instructions for Ubuntu.
Recall that your WSL Subsystem should have at least 6GB of free memory for the installation step (specifically, the precompilation). Please consult the official instructions to learn how to adjust your WSL.
macOS If you are using macOS 10.12 or newer, you need to install the Xcode command line tools, as explained in the following instructions.
  1. Launch a Terminal and copy and paste the command xcode-select --install, then press enter.
  2. A window will appear asking you: The xcode-select command requires the command line developer tools. Would you like to install the tools now?. Confirm this by clicking Install.
  3. Wait for this to complete; it needs to download about 130 MB of data.
  4. You can verify that everything worked verifying the /Library/Developer/CommandLineTools/usr/bin/ exists and contains executables such as clang and clang++, the C and C++ compiler.
Ubuntu or Debian If you are using Ubuntu 18.04 "Bionic" or newer, or Debian 10 "Buster" or newer, proceed as follows: Enter these commands into a terminal (this will prompt for your password and requires that you have permissions to administer your computer).
sudo apt update
sudo apt install build-essential
Fedora If you are using Fedora 28 or newer, enter the following commands into a terminal (this will prompt for your password and requires that you have permissions to administer your computer).
sudo dnf install gcc-c++ make
Other or older operating systems supported by Julia We do not provided official support for other such systems at this time. But if you wish to try anyway, you will need to install at least GNU make, and a fairly recent C++ compiler supporting the C++17 standard. Suitable compilers include
  • GNU C/C++ compiler (gcc) version 7 or newer,
  • Clang C/C++ compiler version 5 or newer,
  • Intel C/C++ Compiler (icc) version 19.0 or newer.

Step 2: Install Julia

OSCAR requires at least Julia 1.6.0, but we recommend running it with the latest stable Julia release.

WARNING:
  • Windows users should not install the Julia version for Windows. Instead, please install the Linux version inside Windows Subsystem for Linux (WSL).
  • Linux and macOS users should generally not install the Julia version provided by their package manager (e.g., `apt`, `pac`, `dnf`, `homebrew`, ...), as in many cases, these Julia version are either outdated, or crippled, or both.

We recommend installing Julia via juliaup which makes it easy to install and update Julia. For advanced users it can also manage multiple Julia versions in parallel. Just enter

curl -fsSL https://install.julialang.org | sh

Alternatively you can also download it from the Julia homepage, and follow their platform specific instructions.

Step 3: Install OSCAR

To then install OSCAR, just start julia and run

using Pkg
Pkg.add("Oscar")

This will run for a few minutes. From then on, you can start Julia, then type using Oscar and press enter to use OSCAR. The result should look something like this:

julia> using Oscar
  ___   ____   ____    _    ____
 / _ \ / ___| / ___|  / \  |  _ \   |  Combining ANTIC, GAP, Polymake, Singular
| | | |\___ \| |     / _ \ | |_) |  |  Type "?Oscar" for more information
| |_| | ___) | |___ / ___ \|  _ <   |  Manual: https://docs.oscar-system.org
 \___/ |____/ \____/_/   \_\_| \_\  |  Version 1.0.0

julia>

Please have a look at

for some examples (as Jupyter notebooks).

Getting a GAP prompt

If you are a GAP user and have installed loaded OSCAR in a Julia session as described above, you can at any time switch back and forth between the Julia prompt and a GAP prompt, by using the command GAP.prompt():

julia> x = 1
1

julia> GAP.prompt()
gap> Julia.x;
1
gap> G := SymmetricGroup(3);
Sym( [ 1 .. 3 ] )
gap> quit;   # or press Ctrl-D

julia> GAP.Globals.G
GAP: Sym( [ 1 .. 3 ] )

Using IJulia for notebooks

IJulia can be installed by following its installation page. Note that in some cases, IJulia must be “built” explicitly, see the trouble shooting page. If you try to open an existing notebook (stored in a “.ipynb” file), it might refer to an older Julia version, resulting in a “Kernel error”; the solution is then to select a different kernel from the menu.

If you are using OSCAR in the Windows Subsystem for Linux, you will require a browser in your subsystem. This can be a probem as the default subsystem is Ubuntu and Ubuntu installs browsers via snap which is disabled for subsystems. To circumvent this problem, please see how to install browsers via deb.

System-wide installation of Oscar

It is possible to install Oscar and its cornerstones only once on your system, and to let several people use this installation. For that, the following bash scripts can be used.

(Users of such a system-wide installation may run into Julia errors if they have already installed some dependencies of Oscar in their ~/.julia/packages, or if they add them later on.)

Install Oscar system-wide, or update the system-wide installation of Oscar when a new version is available. Enter the following commands into a file (for example oscar_systemwide_install), adjust the paths for the variables julia_for_oscar and central_depot, and then run the script in a terminal (with administrator rights).
#!/bin/bash

# Specify the intended version of Julia.
julia_for_oscar=/users/oscar/julia-1.8.5/bin/julia

# Specify the intended location of the central Oscar installation.
central_depot=/users/oscar/JULIA_DEPOT

# We will store the necessary artifacts in the
# "architecture dependent location" in Julia's default DEPOT_PATH.
# First determine this path and create the directory if necessary.
# (Here we asume that `DEPOT_PATH[2]` is the architecture-specific
# shared system directory, as documented for the default value of
# `DEPOT_PATH`.)
system_depot=$(${julia_for_oscar} --startup-file=no -e 'println(DEPOT_PATH[2])')
mkdir -p "${system_depot}/artifacts"

# Set the Julia variables that control the location of packages.
# (Do not admit the current user's own depot path.)
export JULIA_DEPOT_PATH=${central_depot}:${system_depot}

# Clean the environment, such that the already centrally installed packages
# get replaced by newer versions if necessary.
# (This is safer than calling `Pkg.update()` in Julia.)
# Then let Julia install and precompile the packages.
${julia_for_oscar} --project=@v#.#-oscar -e 'using Pkg, Artifacts; \
rm("'${central_depot}'/environments/v" * join(split(string(VERSION), ".")[1:2], ".") * "/Project.toml", force=true)
Artifacts.with_artifacts_directory("'${system_depot}'/artifacts") do; \
Pkg.add("Oscar"); \
Pkg.add("GAP"); \
Pkg.add("Nemo"); \
Pkg.add("Hecke"); \
Pkg.add("Singular"); \
Pkg.add("Polymake"); \
Pkg.add("AbstractAlgebra"); \
Pkg.instantiate(); \
end; \
exit();'
Call Julia such that the system-wide installation of Oscar gets loaded when the user enters using Oscar in the Julia session. Enter the following commands into a file (for example julia_with_oscar), adjust the paths for the variables julia_for_oscar and central_depot, and then run the script in a terminal (not with administrator rights).
#!/bin/bash

# Specify the intended version of Julia.
julia_for_oscar=/users/oscar/julia-1.8.5/bin/julia

# Specify the intended location of the central Oscar installation.
central_depot=/users/oscar/JULIA_DEPOT

# Admit the path with the central installation.
export JULIA_DEPOT_PATH=:${central_depot}
export JULIA_LOAD_PATH=":@v#.#-oscar"

# Call Julia.
${julia_for_oscar} $*
Edit this page Contact Imprint Privacy policy © 2018-2024 The OSCAR Team