I tried to install lmtools using Anaconda Python 3.8.5 on Debian using the command
python setup.py install
I got several syntax errors. I could fix the syntax error for "print" by adding parentheses.
Another error was for the statement "if weightkey <> None" and I assume that "<>" canbe replaced by "!="
The one error that I could not figure out was about this line:
filename = 'out/LMA-density%s%5.2fkm%5.1fs.pdf' % (starttime.strftime('%Y%m%d%H%M%S'), dx/1000.0, time_delta.seconds)
which gave invalid syntax
Hopefully you can figure out fixes for such errors.
byte-compiling /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/AWIPS_tools.py to AWIPS_tools.cpython-38.pyc
File "/usr/local/anaconda3/lib/python3.8/site-packages/lmatools/AWIPS_tools.py", line 106
print h5_filenames
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(h5_filenames)?
byte-compiling /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/multiples_nc.py to multiples_nc.cpython-38.pyc
File "/usr/local/anaconda3/lib/python3.8/site-packages/lmatools/multiples_nc.py", line 215
print label_string, x.shape, density.max(), density.sum()
^
SyntaxError: invalid syntax
byte-compiling /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/multiples.py to multiples.cpython-38.pyc
File "/usr/local/anaconda3/lib/python3.8/site-packages/lmatools/multiples.py", line 195
if len(these_events) <> fl['n_points']:
^
SyntaxError: invalid syntax
byte-compiling /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/NLDN.py to NLDN.cpython-38.pyc
byte-compiling /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/small_multiples.py to small_multiples.cpython-38.pyc
File "/usr/local/anaconda3/lib/python3.8/site-packages/lmatools/small_multiples.py", line 12
raise AssertionError, "A valid figure must be passed in."
^
SyntaxError: invalid syntax
byte-compiling /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/init.py to init.cpython-38.pyc
byte-compiling /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/make_grids.py to make_grids.cpython-38.pyc
File "/usr/local/anaconda3/lib/python3.8/site-packages/lmatools/make_grids.py", line 423
print 'max extent is', extent_density_grid.max()
^
SyntaxError: invalid syntax
byte-compiling /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/flashsort/init.py to init.cpython-38.pyc
byte-compiling /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/flashsort/autosort/autorun_mflash.py to autorun_mflash.cpython-38.pyc
File "/usr/local/anaconda3/lib/python3.8/site-packages/lmatools/flashsort/autosort/autorun_mflash.py", line 199
print flashes.cols.init_lon[0:10]
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(flashes.cols.init_lon[0:10])?
byte-compiling /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/flashsort/autosort/LMAarrayFile.py to LMAarrayFile.cpython-38.pyc
File "/usr/local/anaconda3/lib/python3.8/site-packages/lmatools/flashsort/autosort/LMAarrayFile.py", line 310
print lma.startmonth, lma.startday, lma.startyear
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(lma.startmonth, lma.startday, lma.startyear)?
byte-compiling /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/flashsort/autosort/init.py to init.cpython-38.pyc
byte-compiling /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/flashsort/autosort/flash_stats.py to flash_stats.cpython-38.pyc
File "/usr/local/anaconda3/lib/python3.8/site-packages/lmatools/flashsort/autosort/flash_stats.py", line 148
print "Perturbing one source to help triangulation for flash with {0} points".format(flash.pointCount)
^
SyntaxError: invalid syntax
byte-compiling /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/flashsort/autosort/autorun_sklearn.py to autorun_sklearn.cpython-38.pyc
File "/usr/local/anaconda3/lib/python3.8/site-packages/lmatools/flashsort/autosort/autorun_sklearn.py", line 39
print id1.shape, id2.shape
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(id1.shape, id2.shape)?
byte-compiling /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/flashsort/autosort/autorun.py to autorun.cpython-38.pyc
File "/usr/local/anaconda3/lib/python3.8/site-packages/lmatools/flashsort/autosort/autorun.py", line 126
print flashes.cols.init_lon[0:10]
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(flashes.cols.init_lon[0:10])?
byte-compiling /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/flashsort/autosort/write_flashes.py to write_flashes.cpython-38.pyc
byte-compiling /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/flash_stats.py to flash_stats.cpython-38.pyc
File "/usr/local/anaconda3/lib/python3.8/site-packages/lmatools/flash_stats.py", line 322
print pattern
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(pattern)?
byte-compiling /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/density_tools.py to density_tools.cpython-38.pyc
File "/usr/local/anaconda3/lib/python3.8/site-packages/lmatools/density_tools.py", line 148
print "Tests complete."
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Tests complete.")?
byte-compiling /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/grid_collection.py to grid_collection.cpython-38.pyc
byte-compiling /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/density_to_files.py to density_to_files.cpython-38.pyc
File "/usr/local/anaconda3/lib/python3.8/site-packages/lmatools/density_to_files.py", line 141
print flash_count_messages
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(flash_count_messages)?
I tried to install lmtools using Anaconda Python 3.8.5 on Debian using the command python setup.py install
I got several syntax errors. I could fix the syntax error for "print" by adding parentheses. Another error was for the statement "if weightkey <> None" and I assume that "<>" canbe replaced by "!=" The one error that I could not figure out was about this line: filename = 'out/LMA-density%s%5.2fkm%5.1fs.pdf' % (starttime.strftime('%Y%m%d%H%M%S'), dx/1000.0, time_delta.seconds) which gave invalid syntax
Hopefully you can figure out fixes for such errors.
This is the full output:
running install running build running build_py creating build creating build/lib creating build/lib/lmatools copying coordinateSystems.py -> build/lib/lmatools copying fakeLMA.py -> build/lib/lmatools copying AWIPS_tools.py -> build/lib/lmatools copying multiples_nc.py -> build/lib/lmatools copying multiples.py -> build/lib/lmatools copying NLDN.py -> build/lib/lmatools copying small_multiples.py -> build/lib/lmatools copying init.py -> build/lib/lmatools copying make_grids.py -> build/lib/lmatools copying flash_stats.py -> build/lib/lmatools copying lma_io.py -> build/lib/lmatools copying density_tools.py -> build/lib/lmatools copying grid_collection.py -> build/lib/lmatools copying density_to_files.py -> build/lib/lmatools creating build/lib/lmatools/flashsort copying flashsort/init.py -> build/lib/lmatools/flashsort creating build/lib/lmatools/flashsort/autosort copying flashsort/autosort/autorun_mflash.py -> build/lib/lmatools/flashsort/autosort copying flashsort/autosort/LMAarrayFile.py -> build/lib/lmatools/flashsort/autosort copying flashsort/autosort/init.py -> build/lib/lmatools/flashsort/autosort copying flashsort/autosort/flash_stats.py -> build/lib/lmatools/flashsort/autosort copying flashsort/autosort/autorun_sklearn.py -> build/lib/lmatools/flashsort/autosort copying flashsort/autosort/autorun.py -> build/lib/lmatools/flashsort/autosort copying flashsort/autosort/write_flashes.py -> build/lib/lmatools/flashsort/autosort running install_lib creating /usr/local/anaconda3/lib/python3.8/site-packages/lmatools copying build/lib/lmatools/coordinateSystems.py -> /usr/local/anaconda3/lib/python3.8/site-packages/lmatools copying build/lib/lmatools/fakeLMA.py -> /usr/local/anaconda3/lib/python3.8/site-packages/lmatools copying build/lib/lmatools/AWIPS_tools.py -> /usr/local/anaconda3/lib/python3.8/site-packages/lmatools copying build/lib/lmatools/multiples_nc.py -> /usr/local/anaconda3/lib/python3.8/site-packages/lmatools copying build/lib/lmatools/multiples.py -> /usr/local/anaconda3/lib/python3.8/site-packages/lmatools copying build/lib/lmatools/NLDN.py -> /usr/local/anaconda3/lib/python3.8/site-packages/lmatools copying build/lib/lmatools/small_multiples.py -> /usr/local/anaconda3/lib/python3.8/site-packages/lmatools copying build/lib/lmatools/init.py -> /usr/local/anaconda3/lib/python3.8/site-packages/lmatools copying build/lib/lmatools/make_grids.py -> /usr/local/anaconda3/lib/python3.8/site-packages/lmatools creating /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/flashsort copying build/lib/lmatools/flashsort/init.py -> /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/flashsort creating /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/flashsort/autosort copying build/lib/lmatools/flashsort/autosort/autorun_mflash.py -> /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/flashsort/autosort copying build/lib/lmatools/flashsort/autosort/LMAarrayFile.py -> /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/flashsort/autosort copying build/lib/lmatools/flashsort/autosort/init.py -> /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/flashsort/autosort copying build/lib/lmatools/flashsort/autosort/flash_stats.py -> /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/flashsort/autosort copying build/lib/lmatools/flashsort/autosort/autorun_sklearn.py -> /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/flashsort/autosort copying build/lib/lmatools/flashsort/autosort/autorun.py -> /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/flashsort/autosort copying build/lib/lmatools/flashsort/autosort/write_flashes.py -> /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/flashsort/autosort copying build/lib/lmatools/flash_stats.py -> /usr/local/anaconda3/lib/python3.8/site-packages/lmatools copying build/lib/lmatools/lma_io.py -> /usr/local/anaconda3/lib/python3.8/site-packages/lmatools copying build/lib/lmatools/density_tools.py -> /usr/local/anaconda3/lib/python3.8/site-packages/lmatools copying build/lib/lmatools/grid_collection.py -> /usr/local/anaconda3/lib/python3.8/site-packages/lmatools copying build/lib/lmatools/density_to_files.py -> /usr/local/anaconda3/lib/python3.8/site-packages/lmatools byte-compiling /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/coordinateSystems.py to coordinateSystems.cpython-38.pyc byte-compiling /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/fakeLMA.py to fakeLMA.cpython-38.pyc File "/usr/local/anaconda3/lib/python3.8/site-packages/lmatools/fakeLMA.py", line 18 print "Regenerating preloadable LMA data" ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Regenerating preloadable LMA data")?
byte-compiling /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/AWIPS_tools.py to AWIPS_tools.cpython-38.pyc File "/usr/local/anaconda3/lib/python3.8/site-packages/lmatools/AWIPS_tools.py", line 106 print h5_filenames ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(h5_filenames)?
byte-compiling /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/multiples_nc.py to multiples_nc.cpython-38.pyc File "/usr/local/anaconda3/lib/python3.8/site-packages/lmatools/multiples_nc.py", line 215 print label_string, x.shape, density.max(), density.sum() ^ SyntaxError: invalid syntax
byte-compiling /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/multiples.py to multiples.cpython-38.pyc File "/usr/local/anaconda3/lib/python3.8/site-packages/lmatools/multiples.py", line 195 if len(these_events) <> fl['n_points']: ^ SyntaxError: invalid syntax
byte-compiling /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/NLDN.py to NLDN.cpython-38.pyc byte-compiling /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/small_multiples.py to small_multiples.cpython-38.pyc File "/usr/local/anaconda3/lib/python3.8/site-packages/lmatools/small_multiples.py", line 12 raise AssertionError, "A valid figure must be passed in." ^ SyntaxError: invalid syntax
byte-compiling /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/init.py to init.cpython-38.pyc byte-compiling /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/make_grids.py to make_grids.cpython-38.pyc File "/usr/local/anaconda3/lib/python3.8/site-packages/lmatools/make_grids.py", line 423 print 'max extent is', extent_density_grid.max() ^ SyntaxError: invalid syntax
byte-compiling /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/flashsort/init.py to init.cpython-38.pyc byte-compiling /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/flashsort/autosort/autorun_mflash.py to autorun_mflash.cpython-38.pyc File "/usr/local/anaconda3/lib/python3.8/site-packages/lmatools/flashsort/autosort/autorun_mflash.py", line 199 print flashes.cols.init_lon[0:10] ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(flashes.cols.init_lon[0:10])?
byte-compiling /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/flashsort/autosort/LMAarrayFile.py to LMAarrayFile.cpython-38.pyc File "/usr/local/anaconda3/lib/python3.8/site-packages/lmatools/flashsort/autosort/LMAarrayFile.py", line 310 print lma.startmonth, lma.startday, lma.startyear ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(lma.startmonth, lma.startday, lma.startyear)?
byte-compiling /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/flashsort/autosort/init.py to init.cpython-38.pyc byte-compiling /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/flashsort/autosort/flash_stats.py to flash_stats.cpython-38.pyc File "/usr/local/anaconda3/lib/python3.8/site-packages/lmatools/flashsort/autosort/flash_stats.py", line 148 print "Perturbing one source to help triangulation for flash with {0} points".format(flash.pointCount) ^ SyntaxError: invalid syntax
byte-compiling /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/flashsort/autosort/autorun_sklearn.py to autorun_sklearn.cpython-38.pyc File "/usr/local/anaconda3/lib/python3.8/site-packages/lmatools/flashsort/autosort/autorun_sklearn.py", line 39 print id1.shape, id2.shape ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(id1.shape, id2.shape)?
byte-compiling /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/flashsort/autosort/autorun.py to autorun.cpython-38.pyc File "/usr/local/anaconda3/lib/python3.8/site-packages/lmatools/flashsort/autosort/autorun.py", line 126 print flashes.cols.init_lon[0:10] ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(flashes.cols.init_lon[0:10])?
byte-compiling /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/flashsort/autosort/write_flashes.py to write_flashes.cpython-38.pyc byte-compiling /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/flash_stats.py to flash_stats.cpython-38.pyc File "/usr/local/anaconda3/lib/python3.8/site-packages/lmatools/flash_stats.py", line 322 print pattern ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(pattern)?
byte-compiling /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/lma_io.py to lma_io.cpython-38.pyc File "/usr/local/anaconda3/lib/python3.8/site-packages/lmatools/lma_io.py", line 40 print '{0} -- {1} flashes > {2} pts; dt+={3} '.format(filename, n_flashes, min_points, extra_dt) ^ SyntaxError: invalid syntax
byte-compiling /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/density_tools.py to density_tools.cpython-38.pyc File "/usr/local/anaconda3/lib/python3.8/site-packages/lmatools/density_tools.py", line 148 print "Tests complete." ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Tests complete.")?
byte-compiling /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/grid_collection.py to grid_collection.cpython-38.pyc byte-compiling /usr/local/anaconda3/lib/python3.8/site-packages/lmatools/density_to_files.py to density_to_files.cpython-38.pyc File "/usr/local/anaconda3/lib/python3.8/site-packages/lmatools/density_to_files.py", line 141 print flash_count_messages ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(flash_count_messages)?
running install_egg_info Writing /usr/local/anaconda3/lib/python3.8/site-packages/lmatools-0.1-py3.8.egg-info