%%bash rm -rf ~/geog0111 cd ~ && git clone https://github.com/UCL-EO/geog0111.git cd ~/geog0111 cd notebooks && tar xzf data/cacheData.tar.Z %%bash pip install virtualenv --quiet mkdir -p ~/envs virtualenv ~/envs/geog0111 source ~/envs/geog0111/bin/activate %%bash # delete unwanted packages cd ~/geog0111 awk < environment.yml -F= '{print $1}' | sed 's/-//' | sed 's/ //g' | grep -v 'pip:' | \ grep -v 'channels:' | grep -v 'dependencies:' | grep -v 'conda-forge' | \ grep -v 'defaults' | grep -v '#' | grep -vi conda | grep -v libmambapy | \ grep -vi gdal | grep -v git | grep -vi python | grep -v nomkl | \ grep -vi matplotlib | grep -vi hdf5 | grep -vi libnetcdf > requirements.txt # look for gdal, matplotlib, hdf5, libnetcdf, libmambapy versions outside this # nomkl, python, git not needed %%bash source ~/envs/geog0111/bin/activate cd ~/geog0111 pip install -r requirements.txt #pip install GDAL==`ogrinfo --version | awk -F, '{print $1}' | awk '{print $2}'` %%bash # look for gdal, matplotlib, hdf5, libnetcdf, libmambapy versions outside this # codes for gdal # https://gis.stackexchange.com/questions/370736/installing-gdal-on-ubuntu-20-04-unmet-dependencies sudo add-apt-repository ppa:ubuntugis/ppa sudo apt-get update sudo apt-get install gdal-bin #sudo apt install libpq5=12.10-0ubuntu0.20.04.1 sudo apt install libpq-dev ogrinfo --version sudo apt-get install libgdal-dev export CPLUS_INCLUDE_PATH=/usr/include/gdal export C_INCLUDE_PATH=/usr/include/gdal pip install GDAL==`ogrinfo --version | awk -F, '{print $1}' | awk '{print $2}'` %%bash # look for gdal, matplotlib, hdf5, libnetcdf, libmambapy versions outside this source ~/envs/geog0111/bin/activate pip install GDAL==`ogrinfo --version | awk -F, '{print $1}' | awk '{print $2}'`