Note: extract from v3.0 howto for installing conda/Pytroll. This part has to be done before: 1) Installation of the basic PyTROLL/Satpy environment which can be found in the SPStools v4.1 documentation. ====================================================================== HOWTO install and use SatPy for EUMETCast under Debian GNU/Linux amd64 ====================================================================== Version 1.0 2018/10/?? by Ernst Lobsiger Version 2.0 2019/04/12 by Ernst Lobsiger Version 3.0 2021/01/08 by Ernst Lobsiger 1) INTRODUCTION --------------- SatPy is still in development. It is the highest integration of other PyTROLL packages to read, process and store satellite data. http://www.pytroll.org PyTROLL/SatPy is now used by a couple of European met offices 24/7. As a user of EUMETCast you can profit from this Open Source project. There is an important note (at the time of writing SatPy is at 0.25!): ********************************************************************** * "SatPy's interfaces are not guaranteed stable and may change until * * version 1.0 when backwards compatibility will be a main focus." * ********************************************************************** When I was new to SatPy (and Python!) in 2018 a big problem was the sparse documentation. So already an installation of a working PyTROLL environment meant a steep learning curve. Much of my try and error has been done with both Debian 9 (Stretch) and Devuan 2 (ASCII) still using Python 2.7 and later (2.7 unmaintained since January 1st 2020) with Debian 10 (Buster) and Devuan 3 (Beowulf) using Python 3.7 + 3.8. Under GNU/Linux you basically have three installation methods. You can install Python and SatPy packages as user root in /usr with installer pip. You can use virtualenv and pip that lets you do most of the SatPy install as an unprivileged user in your home directory or you can take Anaconda (or better Miniconda) to do everything as an unprivileged user. While I have used all three methods in the past, the SatPy documentation recommends virtualenv under Ubuntu also making this the prefered install for Debian or Devuan. After my rather technical Version 2.0 of the HOWTO for GNU/Linux I issued a Version 1.0 of a much more user friendly HOWTO for users under Windows 10. As I tried to synchronize as much as possible my SatPy development work under GNU/Linux with what I finally offered for Windows 10 the only possibility was to base everything on Miniconda3. This HOWTO 3.0 for GNU/Linux now uses basically the same data structures and as I used in the HOWTO 1.0 for Windows 10. In an attempt to further synchronize my work for both Operating Systems I just issued a Version 3.0 of the Windows HOWTO that is the practical equivalent of this paper. Installation and usage of my packet in both Operating Systems is now straight forward. The only few differences left are explained below: a) Under GNU/Linux it is assumed that you have ImageMagick (IM) installed. Under Windows I provided a version of "convert.exe" that does the job. b) Under GNU/Linux I provide xRITDecompress as compiled under Debian 10 (Buster) amd64. In the rare case that this should not work on an other GNU/Linux amd64 distribution, I also provide an improved source code of this decompressor that has been released as open source by EUMETSAT. Under Windows 10 I provide xRITDecompress.exe as compiled under CygWin. c) Under GNU/Linux I use the common GNU system uncompression utilities. Under Windows I use a portable version of 7za.exe for similar tasks. d) There are some minor differences due to the shells Bash and CMD.exe. Now let's start the install of Miniconda3 and my structures and scripts. As usual I take the CLI perspective. On a graphic system use a terminal. We use a generic names "user" and "host". This either stands for an image processsor "user" in an EUMETCast receiver "host" or a human unprivileged user that happens to have access to satellite data received via EUMETCast. 2) Installation of Miniconda3 with PyTROLL/Satpy under Debian 10 GNU/Linux -------------------------------------------------------------------------- We only take small Miniconda3 as a full blown Anaconda3 is just bloatware. 2.1.) Download the Miniconda3 installer (situation 2021/01/11) -------------------------------------------------------------- With a graphic system (this can also be Windows) go to https://docs.conda.io/en/latest/miniconda.html and under "Linux installers" spot and download Python 3.8 Miniconda3 Linux 64-bit 89.9 MiB copy and paste the SHA256 hash (to check later your file is intact) 1314b90489f154602fd794accfc90446111514a5a72fe1f71ab83e07de9504a7 If you are on a CLI only system use wget and the direct link user@host:~$ wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh and you can then compare the SHA256 on a screen of a graphic system. 2.2) Check the SHA256 hash -------------------------- This test file integrity test is optional but highly recommended! user@host:~$ sha256sum Miniconda3-latest-Linux-x86_64.sh ...must output exactly the same hash: 1314b90489f154602fd794accfc90446111514a5a72fe1f71ab83e07de9504a7 Miniconda3-latest-Linux-x86_64.sh If not something went wrong, Miniconda3-latest-Linux-x86_64.sh might be tainted or damaged! 2.3) Installation of Miniconda3 and PyTROLL/SatPy ------------------------------------------------- This method can completely be done by an unprivileged user in his home directory. Installation is very easy, every help is found on anaconda.com. Installation by an unprivileged user is started at the Command Line Interface (CLI) by user@host:~$ sh Miniconda3-latest-Linux-x86_64.sh - Accept the license (you have no choice) - Install Miniconda3 in your home directory (default) - Make the installer initialize Miniconda3 (type "yes") You are back to the prompt and almost done. Initialize with "yes" added the lines below # >>> conda initialize >>> # !! Contents within this block are managed by 'conda init' !! __conda_setup="$('/home/eumetcast/miniconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)" if [ $? -eq 0 ]; then eval "$__conda_setup" else if [ -f "/home/eumetcast/miniconda3/etc/profile.d/conda.sh" ]; then . "/home/eumetcast/miniconda3/etc/profile.d/conda.sh" else export PATH="/home/eumetcast/miniconda3/bin:$PATH" fi fi unset __conda_setup # <<< conda initialize <<< to your local .bashrc file. This is executed whenever you log in and will make you fall directly to the Miniconda3 "base" environment. To make sure these changes are in effect without logging out and in again this time just issue "user@host:~$ source .bashrc" and your prompt will change to "(base) user@host:~$" saying you are in "base" environment. Your installer and "Swiss Army Knife" is now the command "conda". There is no manual page but conda has a plenthora of help built in. REMEMBER: Whenever you login later you will fall to the (base) environment. If you don't like that you can do a "conda config --set auto_activate_base false" Let's update basic stuff and conda to the very latest versions first: At the prompt "(base) user@host:~$" (Basic Environment) enter conda update -n base -c defaults conda The SatPy documentation says that you have to add conda-forge as repository. At the prompt "(base) user@host:~$" (in Basic Environment) enter conda config --add channels conda-forge Now we create a special environment for PyTROLL with the command conda create --name pytroll and accept the default location at /home/user/miniconda3/envs/pytroll NOTE: If you do not activate environment pytroll before installing packages then these packages will all go to the (base) environment. THEREFORE ACTIVATE pytroll BEFORE INSTALLING PYTROLL/SATPY STUFF: conda activate pytroll This will change your path and your prompt will have (pytroll) in front. Activation in one user terminal does not activate in another terminal !! Anaconda packages are differently packed from pip packages. To make all my PyTROLL/SatPy image generation scripts run I just had to (be pacient): (pytroll) user@host:~$ conda install satpy (pytroll) user@host:~$ conda install pycoast (pytroll) user@host:~$ conda install pyhdf The packages installed above are now found under a rather lengthy path: /home/user/miniconda3/envs/pytroll/lib/python3.8/site-packages A command "conda list satpy" should at least indicate version 0.25.1 You will not have to update for about half a year (*Never touch a running system!*). To get back to the normal prompt "user@host:~$" issue "conda deactivate". BACKGROUND INFO: Activating and deactivating essentially changes your PATH variable. This is where Windows searches for executable commands you type at the prompt. You can check that while in different environments in the following way: (pytroll) user@host:~$ echo $PATH (base) user@host:~$ echo $PATH user@host:~$ echo $PATH