This lesson is being piloted (Beta version)

Install python packages

Overview

Teaching: 5 min min
Exercises: 0 min
Questions
  • How to install certain tough package in python

Objectives

Install matplotlib

pip install -U matplotlib==3.2

Install Basemap

conda install -c anaconda basemap

#Or

pip install basemap

Most important: once installed, you will need to know the location of PROJ_LIB:

$ echo $PROJ_LIB

Inside Jupyter Notebook, add in this line:

import os
os.environ['PROJ_LIB'] = '/home/tuev/.conda/envs/skln/share/proj'
from mpl_toolkits.basemap import Basemap

Install gdal & osgeo

$ conda install -c conda-forge gdal==3.0.1
$ python
>> from osgeo import gdal

Key Points

  • Matplotlib, Basemap, gdal, osgeo