From 970bdb42a3d4343ebbb8011d8c2a2a601ff3d9a6 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Sun, 17 May 2020 01:34:08 -0400 Subject: [PATCH 1/4] List netCDF4 as a pygmt dependency xarray needs the netCDF4 package for reading (perhaps also writing) netCDF files. However, netCDF4 isn't installed by default since it's an optional dependency of xarray. Although pygmt doesn't import netCDF4 package explicitely, some features won't work without the package. See #239 for past discussions. --- doc/install.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/install.rst b/doc/install.rst index 67b803b9e5d..2f4281dfce2 100644 --- a/doc/install.rst +++ b/doc/install.rst @@ -55,6 +55,7 @@ PyGMT requires the following libraries: * `numpy `__ * `pandas `__ * `xarray `__ +* `netCDF4 `__ * `packaging `__ The following are optional (but recommended) dependencies: From 98d292d6179d72f7c239ed2cc23556916eb02824 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Sun, 17 May 2020 02:22:04 -0400 Subject: [PATCH 2/4] Also need to install netcdf4 --- doc/install.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/install.rst b/doc/install.rst index 2f4281dfce2..939d2b51c13 100644 --- a/doc/install.rst +++ b/doc/install.rst @@ -80,7 +80,7 @@ First, we must configure conda to get packages from the Now we can create a new conda environment with Python and all our dependencies installed (we'll call it ``pygmt`` but you can change it to whatever you want):: - conda create --name pygmt python=3.6 pip numpy pandas xarray packaging gmt=6.0.0 + conda create --name pygmt python=3.6 pip numpy pandas xarray netcdf4 packaging gmt=6.0.0 Activate the environment by running:: From bfa9ff87497a1dfe3d05b4c17250c76d9bc369c4 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 20 May 2020 23:44:54 -0400 Subject: [PATCH 3/4] Move netcdf4 to optional dependency --- doc/install.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/install.rst b/doc/install.rst index 939d2b51c13..d3b970d1bc9 100644 --- a/doc/install.rst +++ b/doc/install.rst @@ -55,12 +55,12 @@ PyGMT requires the following libraries: * `numpy `__ * `pandas `__ * `xarray `__ -* `netCDF4 `__ * `packaging `__ The following are optional (but recommended) dependencies: * `IPython `__: For embedding the figures in Jupyter notebooks. +* `netCDF4 `__: For reading netCDF4 data via `xarray `__ Installing GMT and other dependencies @@ -80,7 +80,7 @@ First, we must configure conda to get packages from the Now we can create a new conda environment with Python and all our dependencies installed (we'll call it ``pygmt`` but you can change it to whatever you want):: - conda create --name pygmt python=3.6 pip numpy pandas xarray netcdf4 packaging gmt=6.0.0 + conda create --name pygmt python=3.6 pip numpy pandas xarray packaging gmt=6.0.0 Activate the environment by running:: From 6df8b19c01405f9ff9c14480e73a126f2a95f12b Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Thu, 21 May 2020 00:50:56 -0400 Subject: [PATCH 4/4] Add netcdf4 as a non-optional dependency --- doc/install.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/install.rst b/doc/install.rst index d3b970d1bc9..939d2b51c13 100644 --- a/doc/install.rst +++ b/doc/install.rst @@ -55,12 +55,12 @@ PyGMT requires the following libraries: * `numpy `__ * `pandas `__ * `xarray `__ +* `netCDF4 `__ * `packaging `__ The following are optional (but recommended) dependencies: * `IPython `__: For embedding the figures in Jupyter notebooks. -* `netCDF4 `__: For reading netCDF4 data via `xarray `__ Installing GMT and other dependencies @@ -80,7 +80,7 @@ First, we must configure conda to get packages from the Now we can create a new conda environment with Python and all our dependencies installed (we'll call it ``pygmt`` but you can change it to whatever you want):: - conda create --name pygmt python=3.6 pip numpy pandas xarray packaging gmt=6.0.0 + conda create --name pygmt python=3.6 pip numpy pandas xarray netcdf4 packaging gmt=6.0.0 Activate the environment by running::