I would recommend an Ubuntu 18.04 LTS (myself I like Kubuntu (Ubuntu with KDE Desktop))
Kubuntu often feels better for users coming from Windows (my experience), still when using a server like environment and no Desktop Installation, I always use Ubuntu.
- Setup Ubuntu/Kubuntu 18.04 LTS
- Install Anaconda2
- Install SNAP
- do
sudo apt install python-jpy
(this does not work on Ubuntu 16.x , therefore 18.x) - manually (not during installation) config SNAP to talk to your Anaconda2 Python2.7 Installation
I configured snappy by following this guide.
It tells you to do:
#in terminal
cd <snap-install-dir>/bin
./snappy-conf /home/<user>/anaconda2/bin/python
If it works, go to /home/<user>/.snap/snap-python/
and copy the snappy folder to the site-package folder of your python installation /home/<user>/anaconda2/lib/python2.7/site-packages/
cp -r /home/<user>/.snap/snap-python/snappy /home/<user>/anaconda2/lib/python2.7/site-packages
To test if all is right, call python:
python
and run this lines in python
from snappy import ProductIO
p = ProductIO.readProduct('/home/<user>/.snap/snap-python/snappy/testdata/MER_FRS_L1B_SUBSET.dim')
list(p.getBandNames())
your output should look like this:
[‘radiance_1’,
‘radiance_2’,
‘radiance_3’,
‘radiance_4’,
‘radiance_5’,
‘radiance_6’,
‘radiance_7’,
‘radiance_8’,
‘radiance_9’,
‘radiance_10’,
‘radiance_11’,
‘radiance_12’,
‘radiance_13’,
‘radiance_14’,
‘radiance_15’,
‘l1_flags’,
‘detector_index’]
If the configuration returns an error, I followed the hints found in this forum by @marpet on the 19th of September in this thread.
Copy the snappy folder /home/<user>/.snap/snap-python/snappy/
to the site-package folder of your python installation /home/<user>/anaconda3/lib/python2.7/site-packages/
.
cp -r /home/<user>/.snap/snap-python/snappy /home/<user>/anaconda2/lib/python2.7/site-packages
I think, the snappy folder you have just copied, was created when you tried to configure snappy and it ended with an error, therefore the snappy.ini file in the folder is empty by now. Enter the copied folder and create or overwrite a file named snappy.ini with a text editor including this content:
[DEFAULT]
snap_home = /home/\<user\>/snap
java_max_mem: 21G
# the java_max_mem value should be 70-80% of your overall RAM
# snap_start_engine: False
# java_class_path: ./target/classes
# java_library_path: ./lib
# java_options: -Djava.awt.headless=false
# debug: False
To test if all is right use the python commands shown above