
The forum is locked.
The Ocean Color Forum has transitioned over to the Earthdata Forum (https://forum.earthdata.nasa.gov/). The information existing below will be retained for historical reference. Please sign into the Earthdata Forum for active user support.
I'm trying to install the ocssw processor in my Mac (Sierra 10.12.3), I've read all the problems that could exist and test several ways to solve it, but I really couldn't find what I am doing wrong. I tried to install using the script and the GUI (this last has install almost all of the necessary, but give the error in the luts).
This is the end of the log file [Execution log for
[/Applications/seadas-7.4/ocssw/run/scripts/install_ocssw.py, --install-dir=/Applications/seadas-7.4/ocssw, --src, --aqua, --terra, --git-branch=v7.4]]:
Installing scripts (14 of 17)
Python version acceptable
Installing aqua-luts (15 of 17)
Error! could not establish a network connection. Check your network connection.
If you do not find a problem, please try again later.
Error - Could not install luts for aqua
I am using the new version of seadas and:
python --version
Python 2.7.13
openssl version
OpenSSL 1.0.2k 26 Jan 2017
Any suggestions or help would be appreciated.
The error suggests an intermittent network connection issue.
i've allready try to run it again and it doesn't work. As i am using a wifi connection it could be this (the internet here is not so stable). I will try to do it again with a better network connection. Thank you.
Sean
I am having the same problem and as far as I can figure out, I don't have any network issues. I am now connected by ethernet cable but have this issue with both wifi and ethernet.
Any suggestions?
Thanks
Ajit
execution exception: java.io.IOException: install_ocssw.py failed with exit code 1.
Check log for more details.
Installing bundles.sha256sum (1 of 20)
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 2736 100 2736 0 0 29009 0 --:--:-- --:--:-- --:--:-- 29106
Installing common (2 of 20)
Installing OCSSW_bash.env (3 of 20)
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 2894 100 2894 0 0 42306 0 --:--:-- --:--:-- --:--:-- 42558
Installing README (4 of 20)
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 3358 100 3358 0 0 48646 0 --:--:-- --:--:-- --:--:-- 49382
Installing ocrvc (5 of 20)
Installing meris (6 of 20)
Installing modis (7 of 20)
Installing modisa (8 of 20)
Installing hmodisa (9 of 20)
Installing osmi (10 of 20)
Installing oli (11 of 20)
Installing seawifs (12 of 20)
Installing viirsn (13 of 20)
Installing bin (14 of 20)
Installing bin3 (15 of 20)
Installing scripts (16 of 20)
Python version acceptable
Installing seawifs-luts (17 of 20)
Error! could not establish a network connection. Check your network connection.
If you do not find a problem, please try again later.
Error - Could not install luts for seawifs
$ update_luts.py --verbose aqua
$ update_luts.py --verbose terra
$ update_luts.py --verbose viirsn
$ update_luts.py --verbose seawifs
It still does not work. I am absolutely certain that my internet is robust (have tried it over wifi and with ethernet and have checked the speeds which are mostly in excess of 50 mbps up and down). Given that the install/update worked all the way to the step before the LUTS, it is likely it is something else.
I checked the requirements listed on the seadas page and am compliant with all of them but I wonder if this is a symptom of some other problem such as openSSL or something like that not being up to date. I am working with Mac OS Sierra that is up to date.
Thanks
cheers
Ajit
PS This is the message I get:
./update_luts.py --verbose aqua
[ MODIS ]
Error! could not establish a network connection. Check your network connection.
If you do not find a problem, please try again later.
I can't make it not work on my up-to-date MacOS Sierra...
Can you verify the python build you're using:
$ which python
$ python --version
Can you also provide the date/time you attempted and the external IP address of your machine? Might be something in the logs we can check.
Sean
Two things you will want to do (which I did on my MacOS Sierra).
1. Update Python Version: I've seen your same error on my MacOS Sierra. The version of python which comes with MacOS Sierra is "Python 2.7.10". You can update this either laboriously with MacPorts or the quick and easy as I did by downloading Anaconda Python Version 2.7:
https://www.continuum.io/downloads follow their instructions (currently: select Python Version 2.7 "COMMAND-LINE INSTALLER (358M)" for the download and then run "bash Anaconda2-4.3.1-MacOSX-x86_64.sh "). This installs and automatically updates your $PATH environment variable. Open a new window and make sure the version is right. Mine is "Python 2.7.13 :: Anaconda 4.3.0 (x86_64)".
NOTE: You will now need to restart your computer if you are running SeaDAS via the GUI.
2. Delete OCSSW Directory and Reinstall OCSSW: Here's a nuanced bug: Your installation of OCSSW failed but will likely have left an ocssw directory there, mine did. This directory is a failed installation of ocssw. After I installed Anaconda Python, I still got errors trying to install ocssw. I found that when I then deleted my ocssw directory, the installation worked fine.
Hope this helps
Danny
Thanks very much, that worked. I thought I had posted a reply and apologies if you see this twice.
In any case, I also wanted to express my appreciation for you guys for coming up with solutions to problems even when I can't really describe all the symptoms accurately!!
Thanks again
cheers
ajit
I am getting the same error installing luts. I have ensured that I am running the correct python version, I have deleted the OCSSW directory entirely and tried the entire install again, and I have used an ethernet connection. Any help on this error would be greatly appreciated:
Python version acceptable
Installing aqua-luts (12 of 13)
Error! could not establish a network connection. Check your network connection.
If you do not find a problem, please try again later.
Error - Could not install luts for aqua
The exact Python version is not critical. What is critical is that the python used by the OCSSW scripts use an SSL library that supports the relatively recent cyphers used by NASA's https servers. Unless you already have macports python, you should probably install Anaconda python, which provides a current SSL library and certificates. 3rd party Python installations sometimes end up using an outdated Apple openssl library or neglect to provide instructions for installing current certificates. You should mention how you installed Python and show us the results of the commands mentioned in Sean's post and also "
python -c 'import ssl ; print ssl.OPENSSL_VERSION'
".
I am running macOS X 10.11.6.
I have found the exact python version is critical. I have found that python3 does not pass the python version check, nor does the Mac usr version. The only way I can pass the version step is if I am running python2 - specifically python 2.7.13
$ which python
/Users/astridleitner/anaconda3/bin/python #does not work for installs
Because I have and often use python3, I created a separate environment for python2 which I first activate and then use to open the seadas gui with "open -a seadas".
$ which python
/Users/astridleitner/anaconda3/envs/python2/bin/python #passes the version check
$ python --version
Python 2.7.13 :: Continuum Analytics, Inc.
$python -c 'import ssl ; print ssl.OPENSSL_VERSION'
OpenSSL 1.0.2k 26 Jan 2017
Are these all the details and results you need?
Thank you again for your time and help!
update_luts.py --verbose ...
from the command line with the python2 environment? You can also try: /Users/astridleitner/anaconda3/envs/python2/bin/python $OCSSWROOT/run/scripts/update_luts.py --verbose ...
.If that works, you can force the scripts to use
/Users/astridleitner/anaconda3/envs/python2/bin/python
by running pyverchk.py
in the python3 environment. pyverchk.py
should ask if you have another python installation and then allow you to provide the full path to the desired python. It will then edit the python scripts to force use of your Anaconda python2. This will also allow you to run the SeaDAS GUI normally.If you can't get
update_luts.py
to work from the command line, you should check the SSL cyphers from python. Compare this against Sean's list.
Astrids-MBP:Desktop astridleitner$ source activate python2
(python2) Astrids-MBP:Desktop astridleitner$ update_luts.py --verbose ...
-bash: update_luts.py: command not found
(python2) Astrids-MBP:Desktop astridleitner$ /Users/astridleitner/anaconda3/envs/python2/bin/python $OCSSWROOT/run/scripts/update_luts.py --verbose ....
/Users/astridleitner/anaconda3/envs/python2/bin/python: can't open file '/run/scripts/update_luts.py': [Errno 2] No such file or directory
In my ocssw directory in ocssw/run/scripts I do have the update_luts.py file.
If I set my directory to this folder directly and then try to run update_luts.py:
(python2) Astrids-MBP:scripts astridleitner$ python update_luts.py aqua --verbose
ERROR: OCDATAROOT environment variable not set.
Is my syntax wrong? How do I set the OCDATAROOT environment variable?
For the SSL cyphers, I ran :
(python2) Astrids-MBP:scripts astridleitner$ openssl ciphers -tls -v 'HIGH:!ADH:!MD5:@STRENGTH' | egrep "ECDHE-ECDSA-CHACHA20-POLY1305|ECDHE-ECDSA-AES256-GCM-SHA384|ECDHE-ECDSA-AES128-GCM-SHA256|ECDHE-ECDSA-AES256-SHA384|ECDHE-ECDSA-AES128-SHA256"
ECDHE-ECDSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH Au=ECDSA Enc=AESGCM(256) Mac=AEAD
ECDHE-ECDSA-AES256-SHA384 TLSv1.2 Kx=ECDH Au=ECDSA Enc=AES(256) Mac=SHA384
ECDHE-ECDSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH Au=ECDSA Enc=AESGCM(128) Mac=AEAD
ECDHE-ECDSA-AES128-SHA256 TLSv1.2 Kx=ECDH Au=ECDSA Enc=AES(128) Mac=SHA256
I believe this means I do have the correct cyphers?
On another note, it seems my method of opening the seadas gui from my python2 environment has stopped working! I followed exactly the same protocol, but now my update processors run gets me the version error again! I don't understand how this is possible, since the same code worked a few days ago.
Installing scripts (11 of 13)
File "/Applications/seadas-7.4/ocssw/run/scripts/pyverchk.py", line 26
print "%s does not exist." % ver
^
SyntaxError: Missing parentheses in call to 'print'
Error - Python version is not new enough to install luts
If I go back to my terminal and check the python version, however, it shows the proper version!
(python2) Astrids-MBP:scripts astridleitner$ which python
/Users/astridleitner/anaconda3/envs/python2/bin/python
(python2) Astrids-MBP:scripts astridleitner$ python --version
Python 2.7.13 :: Continuum Analytics, Inc.
I am very confused as to what is happening.
Thank you again for all the help!
OCSSWROOT
and OCDATAROOT
, see the very bottom section of SeaDAS Installion:"Add the following lines to your “
.bashrc
” file to configure your command line enviroment [sic]. This assumes your login shell is bash. If you are using a differnt [sic] shell, talk to you system admin.export OCSSWROOT=[SeaDAS_install_dir]/ocssw
source $OCSSWROOT/OCSSW_bash.env
where: SeaDAS_install_dir is the directory where you installed SeaDAS."Using
openssl
to check for the necessary ciphers doesn't ensure that python SSL is using the same library, which is why the (overly complex) python check mentioned above is useful.
(python2) Astrids-MBP:scripts astridleitner$ python update_luts.py aqua --verbose
[ MODIS ]
+ leapsec.dat
+ utcpole.dat
[ Sensor: AQUA ]
+ OPER:MYD02_Emissive_LUTs.V6.1.35.29_OC2.hdf
+ OPER:MYD02_QA_LUTs.V6.1.35.29_OC2.hdf
+ OPER:MYD02_Reflective_LUTs.V6.1.35.29_OC2.hdf
+ EVAL:MYD02_Emissive_LUTs.V6.1.17.24_OC.hdf
+ EVAL:MYD02_Emissive_LUTs.V6.1.17.27_OC.hdf
+ EVAL:MYD02_Emissive_LUTs.V6.1.31.3_OC.hdf
+ EVAL:MYD02_Emissive_LUTs.V6.1.31.5_OC.hdf
+ EVAL:MYD02_Emissive_LUTs.V6.1.31.6_OC.hdf
+ EVAL:MYD02_Emissive_LUTs.V6.1.33.1_OC.hdf
+ EVAL:MYD02_Emissive_LUTs.V6.1.33.4_OC.hdf
+ EVAL:MYD02_Emissive_LUTs.V6.1.33.4_OCa.hdf
+ EVAL:MYD02_Emissive_LUTs.V6.1.33.6_OC2.hdf
+ EVAL:MYD02_Emissive_LUTs.V6.1.33.8_OC2.hdf
+ EVAL:MYD02_Emissive_LUTs.V6.1.35.22_OC2_v2_20161207.hdf
+ EVAL:MYD02_Emissive_LUTs.V6.1.35.22_OC2_v2_rvs.hdf
+ EVAL:MYD02_Emissive_LUTs.V6.1.35.25_OC2_v2_rvs3.hdf
+ EVAL:MYD02_QA_LUTs.V6.1.17.24_OC.hdf
+ EVAL:MYD02_QA_LUTs.V6.1.17.27_OC.hdf
+ EVAL:MYD02_QA_LUTs.V6.1.31.3_OC.hdf
+ EVAL:MYD02_QA_LUTs.V6.1.31.5_OC.hdf
+ EVAL:MYD02_QA_LUTs.V6.1.31.6_OC.hdf
+ EVAL:MYD02_QA_LUTs.V6.1.33.1_OC.hdf
+ EVAL:MYD02_QA_LUTs.V6.1.33.4_OC.hdf
+ EVAL:MYD02_QA_LUTs.V6.1.33.4_OCa.hdf
+ EVAL:MYD02_QA_LUTs.V6.1.33.6_OC2.hdf
+ EVAL:MYD02_QA_LUTs.V6.1.33.8_OC2.hdf
+ EVAL:MYD02_QA_LUTs.V6.1.35.22_OC2_v2_20161207.hdf
+ EVAL:MYD02_QA_LUTs.V6.1.35.22_OC2_v2_rvs.hdf
+ EVAL:MYD02_QA_LUTs.V6.1.35.25_OC2_v2_rvs3.hdf
+ EVAL:MYD02_Reflective_LUTs.V6.1.17.24_OC.hdf
+ EVAL:MYD02_Reflective_LUTs.V6.1.17.27_OC.hdf
+ EVAL:MYD02_Reflective_LUTs.V6.1.31.3_OC.hdf
+ EVAL:MYD02_Reflective_LUTs.V6.1.31.5_OC.hdf
+ EVAL:MYD02_Reflective_LUTs.V6.1.31.6_OC.hdf
+ EVAL:MYD02_Reflective_LUTs.V6.1.33.1_OC.hdf
+ EVAL:MYD02_Reflective_LUTs.V6.1.33.4_OC.hdf
+ EVAL:MYD02_Reflective_LUTs.V6.1.33.4_OCa.hdf
+ EVAL:MYD02_Reflective_LUTs.V6.1.33.6_OC2.hdf
+ EVAL:MYD02_Reflective_LUTs.V6.1.33.8_OC2.hdf
+ EVAL:MYD02_Reflective_LUTs.V6.1.35.22_OC2_v2_20161207.hdf
+ EVAL:MYD02_Reflective_LUTs.V6.1.35.22_OC2_v2_rvs.hdf
+ EVAL:MYD02_Reflective_LUTs.V6.1.35.25_OC2_v2_rvs3.hdf
+ OPER:xcal_modisa_axc39d_1240.hdf
+ OPER:xcal_modisa_axc39d_1640.hdf
+ OPER:xcal_modisa_axc39d_2130.hdf
+ OPER:xcal_modisa_axc39d_412.hdf
+ OPER:xcal_modisa_axc39d_443.hdf
+ OPER:xcal_modisa_axc39d_469.hdf
+ OPER:xcal_modisa_axc39d_488.hdf
+ OPER:xcal_modisa_axc39d_531.hdf
+ OPER:xcal_modisa_axc39d_547.hdf
+ OPER:xcal_modisa_axc39d_555.hdf
+ OPER:xcal_modisa_axc39d_645.hdf
+ OPER:xcal_modisa_axc39d_667.hdf
+ OPER:xcal_modisa_axc39d_678.hdf
+ OPER:xcal_modisa_axc39d_748.hdf
+ OPER:xcal_modisa_axc39d_859.hdf
+ OPER:xcal_modisa_axc39d_869.hdf
+ EVAL:xcal_modisa_adet01_748.hdf
+ EVAL:xcal_modisa_adet01_869.hdf
+ EVAL:xcal_modisa_axc38d_1240.hdf
+ EVAL:xcal_modisa_axc38d_1640.hdf
+ EVAL:xcal_modisa_axc38d_2130.hdf
+ EVAL:xcal_modisa_axc38d_412.hdf
+ EVAL:xcal_modisa_axc38d_443.hdf
+ EVAL:xcal_modisa_axc38d_469.hdf
+ EVAL:xcal_modisa_axc38d_488.hdf
+ EVAL:xcal_modisa_axc38d_531.hdf
+ EVAL:xcal_modisa_axc38d_547.hdf
+ EVAL:xcal_modisa_axc38d_555.hdf
+ EVAL:xcal_modisa_axc38d_645.hdf
+ EVAL:xcal_modisa_axc38d_667.hdf
+ EVAL:xcal_modisa_axc38d_678.hdf
+ EVAL:xcal_modisa_axc38d_748.hdf
+ EVAL:xcal_modisa_axc38d_859.hdf
+ EVAL:xcal_modisa_axc38d_869.hdf
+ EVAL:xcal_modisa_axc39d_1240.hdf
+ EVAL:xcal_modisa_axc39d_1640.hdf
+ EVAL:xcal_modisa_axc39d_2130.hdf
+ EVAL:xcal_modisa_axc39d_412.hdf
+ EVAL:xcal_modisa_axc39d_443.hdf
+ EVAL:xcal_modisa_axc39d_469.hdf
+ EVAL:xcal_modisa_axc39d_488.hdf
+ EVAL:xcal_modisa_axc39d_531.hdf
+ EVAL:xcal_modisa_axc39d_547.hdf
+ EVAL:xcal_modisa_axc39d_555.hdf
+ EVAL:xcal_modisa_axc39d_645.hdf
+ EVAL:xcal_modisa_axc39d_667.hdf
+ EVAL:xcal_modisa_axc39d_678.hdf
+ EVAL:xcal_modisa_axc39d_748.hdf
+ EVAL:xcal_modisa_axc39d_859.hdf
+ EVAL:xcal_modisa_axc39d_869.hdf
+ EVAL:xcal_modisa_axc40d_1240.hdf
+ EVAL:xcal_modisa_axc40d_1640.hdf
+ EVAL:xcal_modisa_axc40d_2130.hdf
+ EVAL:xcal_modisa_axc40d_412.hdf
+ EVAL:xcal_modisa_axc40d_443.hdf
+ EVAL:xcal_modisa_axc40d_469.hdf
+ EVAL:xcal_modisa_axc40d_488.hdf
+ EVAL:xcal_modisa_axc40d_531.hdf
+ EVAL:xcal_modisa_axc40d_547.hdf
+ EVAL:xcal_modisa_axc40d_555.hdf
+ EVAL:xcal_modisa_axc40d_645.hdf
+ EVAL:xcal_modisa_axc40d_667.hdf
+ EVAL:xcal_modisa_axc40d_678.hdf
+ EVAL:xcal_modisa_axc40d_748.hdf
+ EVAL:xcal_modisa_axc40d_859.hdf
+ EVAL:xcal_modisa_axc40d_869.hdf
+ EVAL:xcal_modisa_axc41d_1240.hdf
+ EVAL:xcal_modisa_axc41d_1640.hdf
+ EVAL:xcal_modisa_axc41d_2130.hdf
+ EVAL:xcal_modisa_axc41d_412.hdf
+ EVAL:xcal_modisa_axc41d_443.hdf
+ EVAL:xcal_modisa_axc41d_469.hdf
+ EVAL:xcal_modisa_axc41d_488.hdf
+ EVAL:xcal_modisa_axc41d_531.hdf
+ EVAL:xcal_modisa_axc41d_547.hdf
+ EVAL:xcal_modisa_axc41d_555.hdf
+ EVAL:xcal_modisa_axc41d_645.hdf
+ EVAL:xcal_modisa_axc41d_667.hdf
+ EVAL:xcal_modisa_axc41d_678.hdf
+ EVAL:xcal_modisa_axc41d_748.hdf
+ EVAL:xcal_modisa_axc41d_859.hdf
+ EVAL:xcal_modisa_axc41d_869.hdf
+ EVAL:xcal_modisa_axc42d_1240.hdf
+ EVAL:xcal_modisa_axc42d_1640.hdf
+ EVAL:xcal_modisa_axc42d_2130.hdf
+ EVAL:xcal_modisa_axc42d_412.hdf
+ EVAL:xcal_modisa_axc42d_443.hdf
+ EVAL:xcal_modisa_axc42d_469.hdf
+ EVAL:xcal_modisa_axc42d_488.hdf
+ EVAL:xcal_modisa_axc42d_531.hdf
+ EVAL:xcal_modisa_axc42d_547.hdf
+ EVAL:xcal_modisa_axc42d_555.hdf
+ EVAL:xcal_modisa_axc42d_645.hdf
+ EVAL:xcal_modisa_axc42d_667.hdf
+ EVAL:xcal_modisa_axc42d_678.hdf
+ EVAL:xcal_modisa_axc42d_748.hdf
+ EVAL:xcal_modisa_axc42d_859.hdf
+ EVAL:xcal_modisa_axc42d_869.hdf
[ Done ]
Is there any way to test and make sure everything is working as it should be?
Does
update_luts.py
work in the GUI as wells on the command line? To check that the processing system is working, you can start with the (somewhat outdated) benchmark. This provides a bash script to process a level-0 file MODIS Aqua file up to an SMI image. It can be a useful exercise to figure out how to make this work with the current OCSSW software to produce netcdf4-cf output.
Thank you so much!
https://oceancolor.gsfc.nasa.gov/forum/oceancolor/topic_show.pl?tid=6542
The 2nd part of the FAQ is important about deleting the OCSSW directory and starting over. Also you may need to reboot your computer in order to make sure seadas is being launched in the environment with your correct python version. Installing from the GUI is easy and should (hopefully) work for you.
Danny
pyvercheck.py
to fail. The current pyvercheck.py
seems to have been designed to handle "too old" python versions and does not run under python3. It is not hard to change the script to support both python2 and python3:$ diff $OCSSWROOT/run/scripts/pyverchk.py pyverchk3.py
2a3,4
> from __future__ import print_function
> from six.moves import input
11c13
< is_installed = raw_input(prompt)
---
> is_installed = input(prompt)
22c24
< ver = raw_input("What is the full path to your python (v2.6 or greater)?: ")
---
> ver = input("What is the full path to your python (v2.6 or greater)?: ")
26c28
< print "%s does not exist." % ver
---
> print("%s does not exist." % ver)
37c39
< print "Python version acceptable"
---
> print("Python version acceptable")
39c41
< print "Your default python interpreter is too old."
---
> print("Your default python interpreter is too old or too new.")
47c49
< print "The following scripts have been modified to use %s as the interpreter:" % pyver
---
> print("The following scripts have been modified to use %s as the interpreter:" % pyver)
58c60
< print "\t", file
---
> print("\t", file)
61c63
< print '''
---
> print('''
64c66
< '''
---
> ''')
Then, with the default Anaconda python3 and the new
pyverchk3.py
, you can edit the scripts so they use Anaconda python2:$ python
Python 3.6.0 |Anaconda 4.3.1 (x86_64)| (default, Dec 23 2016, 13:19:00)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
$ ./pyverchk.py
Your default python interpreter is too old or too new.
Do you have another python installation >= v2.6? (Y or N): Y
What is the full path to your python (v2.6 or greater)?: /opt/continuum.io/anaconda3/envs/python2/bin/python
The following scripts have been modified to use /opt/continuum.io/anaconda3/envs/python2/bin/python as the interpreter:
/Users/seadas/ocssw/run/scripts/fd_matchup.py
[...]
/Users/seadas/ocssw/run/scripts/update_luts.py
Still in the Anaconda python3 environment, the scripts now run:
$ update_luts.py --verbose aqua
[ MODIS ]
+ leapsec.dat
+ utcpole.dat
[ Sensor: AQUA ]
+ OPER:MYD02_Emissive_LUTs.V6.1.35.29_OC2.hdf
[...]
+ EVAL:xcal_modisa_axc42d_869.hdf
[ Done ]
Running update processors installs the old script, causing:
installing scripts (14 of 18)
File "/Users/gwhite/ocssw/run/scripts/pyverchk.py", line 26
print "%s does not exist." % ver
^
SyntaxError: Missing parentheses in call to 'print'
Error - Python version is not new enough to install luts
"SeaDAS 7.4 OCSSW now requires that the host computer have Python installed (at least v2.6) with OpenSSL support built-in (at least v1.0.1)".
Others may care to chime in on the wording and/or version numbers.
I found out recently that it is possible to build a local Python install without OpenSSL support. So even if the Python version is recent, if it is built without OpenSSL support the OCSSW modules using https connections (e.g., update_luts.py) will fail. Perhaps there could be a recommendation for a particular Python distribution on both Linux and Mac platforms (e.g., Anaconda vx.y).
Specific to my local computer (CentOs 6.9 64-bit), I get these diagnostics:
[gumley@bolt ~]$ cat /etc/redhat-release
CentOS release 6.9 (Final)
[gumley@bolt ~]$ which python
/usr/bin/python
[gumley@bolt ~]$ python -V
Python 2.6.6
[gumley@bolt ~]$ python -c 'import ssl ; print ssl.OPENSSL_VERSION'
Traceback (most recent call last):
File "<string>", line 1, in <module>
AttributeError: 'module' object has no attribute 'OPENSSL_VERSION'
However, the OCSSW 7.4 install and operation (e.g., update_luts.py) all works just fine.
ssl.OPENSSL_VERSION
was new in 2.7. Kudos to RedHat for providing a useful Python 2.6 configuration.
status=$(python -c 'import httplib ; c = httplib.HTTPSConnection("oceancolor.gsfc.nasa.gov")')
echo $status
If it returns zero, you are good to go.
result=$(python -c 'import httplib ; c = httplib.HTTPSConnection("oceancolor.gsfc.nasa.gov")')
status=$?
If $status equals zero, you are good to go...
$ /usr/bin/python2.7 -c 'import httplib ; c = httplib.HTTPSConnection("oceancolor.gsfc.nasa.gov"); c.request("GET", "/"); r=c.getresponse(); print r.status, r.reason'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1053, in request
self._send_request(method, url, body, headers)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1093, in _send_request
self.endheaders(body)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1049, in endheaders
self._send_output(message_body)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 893, in _send_output
self.send(msg)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 855, in send
self.connect()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1274, in connect
server_hostname=server_hostname)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 352, in wrap_socket
_context=self)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 579, in __init__
self.do_handshake()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 808, in do_handshake
self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:590)
Using macports' python:
/opt/local/bin/python2.7 -c 'import httplib ; c = httplib.HTTPSConnection("oceancolor.gsfc.nasa.gov"); c.request("GET", "/"); res=c.getresponse(); print res.status, res.reason'
200 OK
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill