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.pyStill 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
attachment 1