Skip to main content
All CollectionsWEkEO Plugins
How to install xcube on Ubuntu?
How to install xcube on Ubuntu?

You want to install xcube to manipulate your data? This article is for you!

Alexandre avatar
Written by Alexandre
Updated over 4 months ago

Context


The xcube software package was created for the purpose of producing, altering, examining, and sharing datacubes derived from Earth observation data. This guide aims to describe the procedure for installing and configuring xcube (and its applications) on Ubuntu 20.04.

Install xcube on Ubuntu from script


Set up a conda environment

There are several methods to install xcube, the main one being via Mamba or Conda. Since Conda could be extremely slow, Mamba is generally preferred. Mamba is a dramatically faster drop-in replacement for Conda and can be installed using conda itself.


The first step consists in updating the local apt package index:

sudo apt-get update -y

Next, create a miniconda3 directory:

mkdir -p ~/miniconda3

Download bash script to install conda with wget. After, execute the bash script:

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3

And add the following PATH variable:

export PATH=$PATH:/root/miniconda3/bin

Initialize conda:

~/miniconda3/bin/conda init bash
~/miniconda3/bin/conda init zsh

Source the conda script to enable conda command in the current shell:

>>. ./miniconda3/etc/profile.d/conda.sh

Once Miniconda is installed, use the conda command to create a conda environment called xcube_env and install Python (>=3.9):

conda create -n xcube_env python=3.9 -y 

Once installed, you can activate the environment:

conda activate xcube_env

Use conda to install mamba:

conda install -c conda-forge mamba -y

Install xcube into the environment

Finally, it is possible to install xcube from its conda-forge package. Starting from version 1 of xcube, the xcube installation automatically installs all plugins, such as the xcube viewer:

mamba install -c conda-forge xcube=1.2.0 proj=9.1.0 pyproj=3.4.1 -y 

After xcube is successfully installed, you can use the package to create and visualize data cubes from Earth observation data. Examples on how to generate datacubes with xcube can be found here.

πŸ” You will find some examples in our article How to use the xcube Viewer? and even more examples soon in our Jupyter Catalogue.

What's next?


Feel free to check these articles that might be of interest for you:

If you have any question or feedback, feel free to contact us:

  • through a chat session available in the bottom right corner of the page

  • via e-mail to our support team (supportATwekeo.eu)

Regardless of how you choose to contact us, you will first be put in touch with our AI Agent Neo. At any time, you can reach a member of the WEkEO User Support team by clicking on "talk to a person" via chat, or by naturally requesting it in reply to Neo's email.

Did this answer your question?