How to setup pygdal environment for jupyter notebook?

  Python
conda create --name pygdal
conda activate pygdal
conda install -c conda-forge gdal
#from osgeo import gdal
#to make jupyter server work
pip install --upgrade jupyterhub
pip install --upgrade nbconvert
conda install -c conda-forge notebook
conda install -c conda-forge jupyter_contrib_nbextensions
# install cartopy
conda install -c conda-forge cartopy
#install rasterio for reading tiff file
conda install -c conda-forge rasterio
#install xarray,dask,netCDF4 for deal with nc file
conda install -c conda-forge xarray dask netCDF4 bottleneck
#exit pygdal environment
conda deactivate