diff --git a/isofit/utils/add_HRRR_profiles_to_modtran_config.py b/isofit/utils/add_HRRR_profiles_to_modtran_config.py index bb64f248..426c5ead 100644 --- a/isofit/utils/add_HRRR_profiles_to_modtran_config.py +++ b/isofit/utils/add_HRRR_profiles_to_modtran_config.py @@ -27,7 +27,6 @@ import click import numpy as np -import pygrib from isofit.core.common import json_load_ascii @@ -297,6 +296,13 @@ def download_HRRR( def get_HRRR_data(filename): + try: + import pygrib + except ImportError: + raise ImportError(""" + pygrib is not installed automatically with this fork of isofit. + Please install pygrib to use this util. + """) grbs = pygrib.open(filename) msgs = [str(grb) for grb in grbs] diff --git a/recipe/environment_isofit_basic.yml b/recipe/environment_isofit_basic.yml index 61f9c1f9..0baa28df 100644 --- a/recipe/environment_isofit_basic.yml +++ b/recipe/environment_isofit_basic.yml @@ -12,7 +12,6 @@ dependencies: - pandas>=0.24 - pep8>=1.7.1 - pre-commit - - pygrib - pytest>=3.5.1 - python-xxhash<3 - pyyaml>=5.1.2 diff --git a/setup.cfg b/setup.cfg index f99445f0..0415b7cd 100644 --- a/setup.cfg +++ b/setup.cfg @@ -25,7 +25,6 @@ install_requires = numpy >= 1.20 pandas >= 0.24.0 pep8 >= 1.7.1 - pygrib pytest >= 3.5.1 pyyaml >= 5.3.2 ray >= 1.2.0