cedadev / ceda-notebooks

Jupyter Notebooks demonstrating CEDA data and tools
BSD 2-Clause "Simplified" License
6 stars 12 forks source link

Get BACI notebook working with Python3 and Seaborn #12

Open agstephens opened 4 years ago

agstephens commented 4 years ago

Need to resolve:

  1. virtualenv + pip + install seaborn
  2. Python3 requirements
EstherConway commented 4 years ago

Section 1 working hurrah, needed to deal with print statements and additional issues

Cell [84] changed %matplotlib inline from %matplotlib notebook

Python 3 issue xrange is now range

EstherConway commented 4 years ago

Section 2 all working apart from SyntaxError: import * only allowed at module level. However, suspect the problem is we are missing a file called grid_lines.py

if os.path.isfile('grid_lines.py'):

    Import some additional functions
    #from grid_lines import *
    print("found file")

I put an else statement which unsurprising indicates no file.

Apart from no gridlines, everything else seems to work and the Good News !!!!! is that the GeoTiff generated writes successfully to my home directory. GDAL and other libraries are successfully imported

EstherConway commented 4 years ago

also having a few problems upating ceda notebooks from JASMIN

(gnome-ssh-askpass:55111): Gtk-WARNING **: cannot open display: error: unable to read askpass response from '/usr/libexec/openssh/gnome-ssh-askpass'

agstephens commented 4 years ago

@EstherConway , firstly, great work getting the python 3 port done 👍

Regarding the error above:

I think the easiest fix is to get it to prompt for your password without opening a graphical window. You can make that happen by typing:

unset SSH_ASKPASS

I actually have this line included in my ~/.bashrc file so that it is always unset in my sessions. I'd recommend doing that.