SeaDAS 8 install_OCSSW problem with python requests
Posted: Fri Mar 19, 2021 10:39 am America/New_York
I've just installed SeaDAS 8.0.0 Beta with the shell script for Mac (Catalina 10.15.7) without incident. I then tried to install OCSSW on the command line and it failed to install LUTs because python was unable to import requests:
(base) daurin@GSSLA18091785:~/Downloads$ ./install_ocssw --list_tags
R2020.1
T2020.0
T2020.1
T2020.2
T2020.3
T2020.4
T2020.5
T2020.6
T2020.7
T2021.0
T2021.3
T2021.4
T2021.5
V2020.0
V2020.1
V2020.2
V2021.0
V2021.1
don
initial
v3.1.0
v3.1.0-rc
v3.1.0-rc1
(base) daurin@GSSLA18091785:~/Downloads$ ./install_ocssw --install_dir ~/Applications/seadas8/ocssw --tag V2021.1 --seadas --modisa --seawifs --modist --msis2a --msis2b --olcis3a --olcis3b --viirsj1 --viirsn
Installing (1 of 19) - bin_macosx_intel
Installing (2 of 19) - lib_macosx_intel
Installing (3 of 19) - opt_macosx_intel
Installing (4 of 19) - root
Installing (5 of 19) - common
Installing (6 of 19) - modis
Installing (7 of 19) - modisa
Installing (8 of 19) - modist
Installing (9 of 19) - msi
Installing (10 of 19) - msis2a
Installing (11 of 19) - msis2b
Installing (12 of 19) - ocrvc
Installing (13 of 19) - olci
Installing (14 of 19) - olcis3a
Installing (15 of 19) - olcis3b
Installing (16 of 19) - seawifs
Installing (17 of 19) - viirs
Installing (18 of 19) - viirsj1
Installing (19 of 19) - viirsn
Installing lut - modisa
Traceback (most recent call last):
File "/Users/daurin/Applications/seadas8/ocssw/bin/update_luts", line 9, in <module>
import seadasutils.LutUtils as Lut
File "/Users/daurin/Applications/seadas8/ocssw/bin/seadasutils/LutUtils.py", line 3, in <module>
import seadasutils.JsonUtils as Session
File "/Users/daurin/Applications/seadas8/ocssw/bin/seadasutils/JsonUtils.py", line 6, in <module>
from seadasutils.ProcUtils import getSession, httpdl
File "/Users/daurin/Applications/seadas8/ocssw/bin/seadasutils/ProcUtils.py", line 13, in <module>
import requests
ModuleNotFoundError: No module named 'requests'
Error: return = 1 : trying to run command = /Users/daurin/Applications/seadas8/ocssw/bin/ocssw_runner --ocsswroot /Users/daurin/Applications/seadas8/ocssw update_luts modisa
I checked that my Anaconda python had requests:
(base) daurin@GSSLA18091785:~/Downloads$ python --version
Python 3.8.3
(base) daurin@GSSLA18091785:~/Downloads$ python
Python 3.8.3 (default, Jul 2 2020, 11:26:31)
[Clang 10.0.0 ] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>> exit()
(base) daurin@GSSLA18091785:~/Downloads$
I then tried to install OCSSW through the SeaDAS GUI with the same result:
execution exception: java.io.IOException: install_ocssw failed with exit code 1.
Check log for more details.
Installing (1 of 13) - bin_macosx_intel
Installing (2 of 13) - lib_macosx_intel
Installing (3 of 13) - opt_macosx_intel
Installing (4 of 13) - root
Installing (5 of 13) - common
Installing (6 of 13) - modis
Installing (7 of 13) - modisa
Installing (8 of 13) - modist
Installing (9 of 13) - ocrvc
Installing (10 of 13) - seawifs
Installing (11 of 13) - viirs
Installing (12 of 13) - viirsj1
Installing (13 of 13) - viirsn
Traceback (most recent call last):
File "/Users/daurin/Applications/seadas8/ocssw/bin/update_luts", line 9, in <module>
import seadasutils.LutUtils as Lut
File "/Users/daurin/Applications/seadas8/ocssw/bin/seadasutils/LutUtils.py", line 3, in <module>
import seadasutils.JsonUtils as Session
File "/Users/daurin/Applications/seadas8/ocssw/bin/seadasutils/JsonUtils.py", line 6, in <module>
from seadasutils.ProcUtils import getSession, httpdl
File "/Users/daurin/Applications/seadas8/ocssw/bin/seadasutils/ProcUtils.py", line 13, in <module>
import requests
ModuleNotFoundError: No module named 'requests'
Installing lut - modisa
Error: return = 1 : trying to run command = /Users/daurin/Applications/seadas8/ocssw/bin/ocssw_runner --ocsswroot /Users/daurin/Applications/seadas8/ocssw update_luts modisa
Looks like install_ocssw is pulling up my old Python2 installation (kept around for testing reverse compatibility in development):
(base) daurin@GSSLA18091785:~/Downloads$ python2
WARNING: Python 2.7 is not recommended.
This version is included in macOS for compatibility with legacy software.
Future versions of macOS will not include Python 2.7.
Instead, it is recommended that you transition to using 'python3' from within Terminal.
Python 2.7.16 (default, Jun 5 2020, 22:59:21)
[GCC 4.2.1 Compatible Apple LLVM 11.0.3 (clang-1103.0.29.20) (-macos10.15-objc- on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named requests
>>>
A related Ocean Color Forum post: https://oceancolor.gsfc.nasa.gov/forum/ ... ?tid=12979
How can this be avoided when running install_ocssw without changing my python2 installation (i.e. how do I force install_ocssw to run in python3)? Thanks!
Dirk
(base) daurin@GSSLA18091785:~/Downloads$ ./install_ocssw --list_tags
R2020.1
T2020.0
T2020.1
T2020.2
T2020.3
T2020.4
T2020.5
T2020.6
T2020.7
T2021.0
T2021.3
T2021.4
T2021.5
V2020.0
V2020.1
V2020.2
V2021.0
V2021.1
don
initial
v3.1.0
v3.1.0-rc
v3.1.0-rc1
(base) daurin@GSSLA18091785:~/Downloads$ ./install_ocssw --install_dir ~/Applications/seadas8/ocssw --tag V2021.1 --seadas --modisa --seawifs --modist --msis2a --msis2b --olcis3a --olcis3b --viirsj1 --viirsn
Installing (1 of 19) - bin_macosx_intel
Installing (2 of 19) - lib_macosx_intel
Installing (3 of 19) - opt_macosx_intel
Installing (4 of 19) - root
Installing (5 of 19) - common
Installing (6 of 19) - modis
Installing (7 of 19) - modisa
Installing (8 of 19) - modist
Installing (9 of 19) - msi
Installing (10 of 19) - msis2a
Installing (11 of 19) - msis2b
Installing (12 of 19) - ocrvc
Installing (13 of 19) - olci
Installing (14 of 19) - olcis3a
Installing (15 of 19) - olcis3b
Installing (16 of 19) - seawifs
Installing (17 of 19) - viirs
Installing (18 of 19) - viirsj1
Installing (19 of 19) - viirsn
Installing lut - modisa
Traceback (most recent call last):
File "/Users/daurin/Applications/seadas8/ocssw/bin/update_luts", line 9, in <module>
import seadasutils.LutUtils as Lut
File "/Users/daurin/Applications/seadas8/ocssw/bin/seadasutils/LutUtils.py", line 3, in <module>
import seadasutils.JsonUtils as Session
File "/Users/daurin/Applications/seadas8/ocssw/bin/seadasutils/JsonUtils.py", line 6, in <module>
from seadasutils.ProcUtils import getSession, httpdl
File "/Users/daurin/Applications/seadas8/ocssw/bin/seadasutils/ProcUtils.py", line 13, in <module>
import requests
ModuleNotFoundError: No module named 'requests'
Error: return = 1 : trying to run command = /Users/daurin/Applications/seadas8/ocssw/bin/ocssw_runner --ocsswroot /Users/daurin/Applications/seadas8/ocssw update_luts modisa
I checked that my Anaconda python had requests:
(base) daurin@GSSLA18091785:~/Downloads$ python --version
Python 3.8.3
(base) daurin@GSSLA18091785:~/Downloads$ python
Python 3.8.3 (default, Jul 2 2020, 11:26:31)
[Clang 10.0.0 ] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>> exit()
(base) daurin@GSSLA18091785:~/Downloads$
I then tried to install OCSSW through the SeaDAS GUI with the same result:
execution exception: java.io.IOException: install_ocssw failed with exit code 1.
Check log for more details.
Installing (1 of 13) - bin_macosx_intel
Installing (2 of 13) - lib_macosx_intel
Installing (3 of 13) - opt_macosx_intel
Installing (4 of 13) - root
Installing (5 of 13) - common
Installing (6 of 13) - modis
Installing (7 of 13) - modisa
Installing (8 of 13) - modist
Installing (9 of 13) - ocrvc
Installing (10 of 13) - seawifs
Installing (11 of 13) - viirs
Installing (12 of 13) - viirsj1
Installing (13 of 13) - viirsn
Traceback (most recent call last):
File "/Users/daurin/Applications/seadas8/ocssw/bin/update_luts", line 9, in <module>
import seadasutils.LutUtils as Lut
File "/Users/daurin/Applications/seadas8/ocssw/bin/seadasutils/LutUtils.py", line 3, in <module>
import seadasutils.JsonUtils as Session
File "/Users/daurin/Applications/seadas8/ocssw/bin/seadasutils/JsonUtils.py", line 6, in <module>
from seadasutils.ProcUtils import getSession, httpdl
File "/Users/daurin/Applications/seadas8/ocssw/bin/seadasutils/ProcUtils.py", line 13, in <module>
import requests
ModuleNotFoundError: No module named 'requests'
Installing lut - modisa
Error: return = 1 : trying to run command = /Users/daurin/Applications/seadas8/ocssw/bin/ocssw_runner --ocsswroot /Users/daurin/Applications/seadas8/ocssw update_luts modisa
Looks like install_ocssw is pulling up my old Python2 installation (kept around for testing reverse compatibility in development):
(base) daurin@GSSLA18091785:~/Downloads$ python2
WARNING: Python 2.7 is not recommended.
This version is included in macOS for compatibility with legacy software.
Future versions of macOS will not include Python 2.7.
Instead, it is recommended that you transition to using 'python3' from within Terminal.
Python 2.7.16 (default, Jun 5 2020, 22:59:21)
[GCC 4.2.1 Compatible Apple LLVM 11.0.3 (clang-1103.0.29.20) (-macos10.15-objc- on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named requests
>>>
A related Ocean Color Forum post: https://oceancolor.gsfc.nasa.gov/forum/ ... ?tid=12979
How can this be avoided when running install_ocssw without changing my python2 installation (i.e. how do I force install_ocssw to run in python3)? Thanks!
Dirk