What i installed
I installed Pydap on my Ubuntu using:
sudo pip install Pydap
If I understand properly output of the pip search pydap
command, I have all Pydap modules installed properly.
But to be 100% sure I also typed:
sudo apt-get install python-dap
No module
However as I can see there's no util path:
/usr/local/lib/python2.7/dist-packages/pydap/util
so I am unable to import util module (import pydap.util
) to execute following code:
from pydap.util.urs import install_basic_client
install_basic_client()
from pydap.client import open_url
dataset = open_url('https://goldsmr4.gesdisc.eosdis.nasa.gov/opendap/MERRA2/M2T1NXSLV.5.12.4/2016/06/MERRA2_400.tavg1_2d_slv_Nx.20160601.nc4')
(code copied from https://wiki.earthdata.nasa.gov/display/EL/How+To+Access+Data+With+PyDAP)
It seems that:
apt-file find urs.py
is not returning any package name to install
Note
At https://wiki.earthdata.nasa.gov/display/EL/How+To+Access+Data+With+PyDAP there's sample 'AUTH MODULE CODE' for those who have no util module installed, but it does not work for me - there's a problem with following line:
opener.addheaders = [('User-agent', pydap.lib.USER_AGENT)]
because pydap.lib has no USER_AGENT defined:
AttributeError: 'module' object has no attribute 'USER_AGENT'