Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional packages needed for installing nsidc-metgenc #123

Open
julober opened this issue Jan 21, 2025 · 3 comments
Open

Additional packages needed for installing nsidc-metgenc #123

julober opened this issue Jan 21, 2025 · 3 comments
Labels
bug Something isn't working Ops Testing Feedback from Ops testing

Comments

@julober
Copy link

julober commented Jan 21, 2025

While installing MetGenC to my personal computer, I had a couple issues with packages that the project needed. I am installing on a Mac and using conda to create a virtual environment running Python 3.12.7.

I installed the following packages (I used conda install) in this order:

  • hdf5
  • netcdf4
  • pyproj

The full error messages that I got, in order, are pasted below.

Let me know if anything needs clarification!

(metgenc) julo9057@cu-vpn-nsidc-172 ~ % python --version
Python 3.12.7
(metgenc) julo9057@cu-vpn-nsidc-172 ~ % pip install nsidc-metgenc
Collecting nsidc-metgenc
  Using cached nsidc_metgenc-1.0.0-py3-none-any.whl.metadata (10 kB)
Collecting boto3<2.0.0,>=1.35.22 (from nsidc-metgenc)
  Using cached boto3-1.36.1-py3-none-any.whl.metadata (6.6 kB)
Collecting check-jsonschema<0.30.0,>=0.29.4 (from nsidc-metgenc)
  Using cached check_jsonschema-0.29.4-py3-none-any.whl.metadata (3.0 kB)
Collecting click<9.0.0,>=8.1.7 (from nsidc-metgenc)
  Using cached click-8.1.8-py3-none-any.whl.metadata (2.3 kB)
Collecting funcy<3.0,>=2.0 (from nsidc-metgenc)
  Using cached funcy-2.0-py2.py3-none-any.whl.metadata (5.9 kB)
Collecting jsonschema<5.0.0,>=4.23.0 (from nsidc-metgenc)
  Using cached jsonschema-4.23.0-py3-none-any.whl.metadata (7.9 kB)
Collecting netCDF4<2.0.0,>=1.6.5 (from nsidc-metgenc)
  Using cached netcdf4-1.7.2.tar.gz (835 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [39 lines of output]
      reading from setup.cfg...
          HDF5_DIR environment variable not set, checking some standard locations ..
      checking /Users/julo9057/anaconda3/envs/metgenc/include...
      hdf5 headers not found in /Users/julo9057/anaconda3/envs/metgenc/include
      checking /Users/julo9057/anaconda3/envs/metgenc/Library/include...
      hdf5 headers not found in /Users/julo9057/anaconda3/envs/metgenc/Library/include
      checking /Users/julo9057/include...
      hdf5 headers not found in /Users/julo9057/include
      checking /usr/local/include...
      hdf5 headers not found in /usr/local/include
      checking /sw/include...
      hdf5 headers not found in /sw/include
      checking /opt/include...
      hdf5 headers not found in /opt/include
      checking /opt/local/include...
      hdf5 headers not found in /opt/local/include
      checking /opt/homebrew/include...
      hdf5 headers not found in /opt/homebrew/include
      checking /usr/include...
      hdf5 headers not found in /usr/include
      Traceback (most recent call last):
        File "/Users/julo9057/anaconda3/envs/metgenc/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/julo9057/anaconda3/envs/metgenc/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/julo9057/anaconda3/envs/metgenc/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/fj/nxxmv5353nj2t68jvxn1wc4w0000gp/T/pip-build-env-szesahxg/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 334, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/fj/nxxmv5353nj2t68jvxn1wc4w0000gp/T/pip-build-env-szesahxg/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 304, in _get_build_requires
          self.run_setup()
        File "/private/var/folders/fj/nxxmv5353nj2t68jvxn1wc4w0000gp/T/pip-build-env-szesahxg/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 320, in run_setup
          exec(code, locals())
        File "<string>", line 277, in <module>
        File "<string>", line 226, in _populate_hdf5_info
      ValueError: did not find HDF5 headers
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
(metgenc) julo9057@cu-vpn-nsidc-172 ~ % 
(metgenc) julo9057@cu-vpn-nsidc-172 ~ % pip install nsidc-metgenc
Collecting nsidc-metgenc
  Using cached nsidc_metgenc-1.0.0-py3-none-any.whl.metadata (10 kB)
Collecting boto3<2.0.0,>=1.35.22 (from nsidc-metgenc)
  Downloading boto3-1.36.2-py3-none-any.whl.metadata (6.6 kB)
Collecting check-jsonschema<0.30.0,>=0.29.4 (from nsidc-metgenc)
  Using cached check_jsonschema-0.29.4-py3-none-any.whl.metadata (3.0 kB)
Collecting click<9.0.0,>=8.1.7 (from nsidc-metgenc)
  Using cached click-8.1.8-py3-none-any.whl.metadata (2.3 kB)
Collecting funcy<3.0,>=2.0 (from nsidc-metgenc)
  Using cached funcy-2.0-py2.py3-none-any.whl.metadata (5.9 kB)
Collecting jsonschema<5.0.0,>=4.23.0 (from nsidc-metgenc)
  Using cached jsonschema-4.23.0-py3-none-any.whl.metadata (7.9 kB)
Collecting netCDF4<2.0.0,>=1.6.5 (from nsidc-metgenc)
  Using cached netcdf4-1.7.2.tar.gz (835 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [33 lines of output]
      reading from setup.cfg...
          HDF5_DIR environment variable not set, checking some standard locations ..
      checking /Users/julo9057/anaconda3/envs/metgenc/include...
      HDF5 library version: 1.14.5 headers found in /Users/julo9057/anaconda3/envs/metgenc/include
      HDF5 library version: 1.14.5 found in /Users/julo9057/anaconda3/envs/metgenc
      NETCDF4_DIR environment variable not set, checking standard locations..
      checking /Users/julo9057/anaconda3/envs/metgenc...
      checking /Users/julo9057/anaconda3/envs/metgenc/Library...
      checking /Users/julo9057...
      checking /usr/local...
      checking /sw...
      checking /opt...
      checking /opt/local...
      checking /opt/homebrew...
      checking /usr...
      Traceback (most recent call last):
        File "/Users/julo9057/anaconda3/envs/metgenc/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/julo9057/anaconda3/envs/metgenc/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/julo9057/anaconda3/envs/metgenc/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/fj/nxxmv5353nj2t68jvxn1wc4w0000gp/T/pip-build-env-2vyq89pa/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 334, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/fj/nxxmv5353nj2t68jvxn1wc4w0000gp/T/pip-build-env-2vyq89pa/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 304, in _get_build_requires
          self.run_setup()
        File "/private/var/folders/fj/nxxmv5353nj2t68jvxn1wc4w0000gp/T/pip-build-env-2vyq89pa/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 320, in run_setup
          exec(code, locals())
        File "<string>", line 292, in <module>
      ValueError: did not find netCDF version 4 headers
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
(metgenc) julo9057@cu-vpn-nsidc-172 ~/anaconda3/envs/metgenc % pip install nsidc-metgenc
Collecting nsidc-metgenc
  Using cached nsidc_metgenc-1.0.0-py3-none-any.whl.metadata (10 kB)
Collecting boto3<2.0.0,>=1.35.22 (from nsidc-metgenc)
  Using cached boto3-1.36.2-py3-none-any.whl.metadata (6.6 kB)
Collecting check-jsonschema<0.30.0,>=0.29.4 (from nsidc-metgenc)
  Using cached check_jsonschema-0.29.4-py3-none-any.whl.metadata (3.0 kB)
Collecting click<9.0.0,>=8.1.7 (from nsidc-metgenc)
  Using cached click-8.1.8-py3-none-any.whl.metadata (2.3 kB)
Collecting funcy<3.0,>=2.0 (from nsidc-metgenc)
  Using cached funcy-2.0-py2.py3-none-any.whl.metadata (5.9 kB)
Collecting jsonschema<5.0.0,>=4.23.0 (from nsidc-metgenc)
  Using cached jsonschema-4.23.0-py3-none-any.whl.metadata (7.9 kB)
Requirement already satisfied: netCDF4<2.0.0,>=1.6.5 in ./lib/python3.12/site-packages (from nsidc-metgenc) (1.7.2)
Collecting pyfiglet<2.0.0,>=1.0.2 (from nsidc-metgenc)
  Using cached pyfiglet-1.0.2-py3-none-any.whl.metadata (7.1 kB)
Collecting pyproj<4.0.0,>=3.7.0 (from nsidc-metgenc)
  Using cached pyproj-3.7.0.tar.gz (225 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [32 lines of output]
      PROJ_DIR is set, using existing PROJ installation..
      
      Traceback (most recent call last):
        File "/Users/julo9057/anaconda3/envs/metgenc/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/julo9057/anaconda3/envs/metgenc/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/julo9057/anaconda3/envs/metgenc/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/fj/nxxmv5353nj2t68jvxn1wc4w0000gp/T/pip-build-env-ae8olsnh/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 334, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/fj/nxxmv5353nj2t68jvxn1wc4w0000gp/T/pip-build-env-ae8olsnh/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 304, in _get_build_requires
          self.run_setup()
        File "/private/var/folders/fj/nxxmv5353nj2t68jvxn1wc4w0000gp/T/pip-build-env-ae8olsnh/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 320, in run_setup
          exec(code, locals())
        File "<string>", line 248, in <module>
        File "<string>", line 188, in get_extension_modules
        File "<string>", line 43, in get_proj_version
        File "/Users/julo9057/anaconda3/envs/metgenc/lib/python3.12/subprocess.py", line 466, in check_output
          return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/julo9057/anaconda3/envs/metgenc/lib/python3.12/subprocess.py", line 548, in run
          with Popen(*popenargs, **kwargs) as process:
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/julo9057/anaconda3/envs/metgenc/lib/python3.12/subprocess.py", line 1026, in __init__
          self._execute_child(args, executable, preexec_fn, close_fds,
        File "/Users/julo9057/anaconda3/envs/metgenc/lib/python3.12/subprocess.py", line 1955, in _execute_child
          raise child_exception_type(errno_num, err_msg, err_filename)
      FileNotFoundError: [Errno 2] No such file or directory: '/Users/julo9057/anaconda3/envs/metgenc/bin/proj'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
@julober julober added bug Something isn't working Ops Testing Feedback from Ops testing labels Jan 21, 2025
@eigenbeam
Copy link
Contributor

Hi Julia, I'm having trouble recreating this, and I'm wondering if you could try creating a virtualenv with python first so we can see if that works. So give this a try:

$ python -m venv oa-venv
$ source ./oa-venv/bin/activate
$ pip install nsidc-metgenc
$ metgenc --help

Cleanup:
$ deactivate
$ rm -rf oa-venv

@julober
Copy link
Author

julober commented Jan 22, 2025

Here is the output that I get when running that:

(base) julo9057@cu-vpn-nsidc-172 ~ % python3.12 -m venv oa-venv
(base) julo9057@cu-vpn-nsidc-172 ~ % source ./oa-venv/bin/activate
(oa-venv) (base) julo9057@cu-vpn-nsidc-172 ~ % pip install nsidc-metgenc
Collecting nsidc-metgenc
  Obtaining dependency information for nsidc-metgenc from https://files.pythonhosted.org/packages/18/13/894441cf90ba505f30ad42756dae9039fc7bd2381e66d9b95afd042eae04/nsidc_metgenc-1.0.0-py3-none-any.whl.metadata
  Downloading nsidc_metgenc-1.0.0-py3-none-any.whl.metadata (10 kB)
Collecting boto3<2.0.0,>=1.35.22 (from nsidc-metgenc)
  Obtaining dependency information for boto3<2.0.0,>=1.35.22 from https://files.pythonhosted.org/packages/79/97/4697aa8050e306d6139815996adeb263ddc83024399a188e8b42587665db/boto3-1.36.3-py3-none-any.whl.metadata
  Downloading boto3-1.36.3-py3-none-any.whl.metadata (6.6 kB)
Collecting check-jsonschema<0.30.0,>=0.29.4 (from nsidc-metgenc)
  Obtaining dependency information for check-jsonschema<0.30.0,>=0.29.4 from https://files.pythonhosted.org/packages/6e/76/15e8840b8fdbd2026c533d66c584cb4870037c07af8fe0abc375cffbd6cf/check_jsonschema-0.29.4-py3-none-any.whl.metadata
  Downloading check_jsonschema-0.29.4-py3-none-any.whl.metadata (3.0 kB)
Collecting click<9.0.0,>=8.1.7 (from nsidc-metgenc)
  Obtaining dependency information for click<9.0.0,>=8.1.7 from https://files.pythonhosted.org/packages/7e/d4/7ebdbd03970677812aac39c869717059dbb71a4cfc033ca6e5221787892c/click-8.1.8-py3-none-any.whl.metadata
  Downloading click-8.1.8-py3-none-any.whl.metadata (2.3 kB)
Collecting funcy<3.0,>=2.0 (from nsidc-metgenc)
  Obtaining dependency information for funcy<3.0,>=2.0 from https://files.pythonhosted.org/packages/d5/08/c2409cb01d5368dcfedcbaffa7d044cc8957d57a9d0855244a5eb4709d30/funcy-2.0-py2.py3-none-any.whl.metadata
  Downloading funcy-2.0-py2.py3-none-any.whl.metadata (5.9 kB)
Collecting jsonschema<5.0.0,>=4.23.0 (from nsidc-metgenc)
  Obtaining dependency information for jsonschema<5.0.0,>=4.23.0 from https://files.pythonhosted.org/packages/69/4a/4f9dbeb84e8850557c02365a0eee0649abe5eb1d84af92a25731c6c0f922/jsonschema-4.23.0-py3-none-any.whl.metadata
  Downloading jsonschema-4.23.0-py3-none-any.whl.metadata (7.9 kB)
Collecting netCDF4<2.0.0,>=1.6.5 (from nsidc-metgenc)
  Downloading netcdf4-1.7.2.tar.gz (835 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 835.1/835.1 kB 4.4 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [33 lines of output]
      reading from setup.cfg...
          HDF5_DIR environment variable not set, checking some standard locations ..
      checking /Users/julo9057/anaconda3/include...
      HDF5 library version: 1.12.1 headers found in /Users/julo9057/anaconda3/include
      HDF5 library version: 1.12.1 found in /Users/julo9057/anaconda3
      NETCDF4_DIR environment variable not set, checking standard locations..
      checking /Users/julo9057/anaconda3...
      checking /Users/julo9057/anaconda3/Library...
      checking /Users/julo9057...
      checking /usr/local...
      checking /sw...
      checking /opt...
      checking /opt/local...
      checking /opt/homebrew...
      checking /usr...
      Traceback (most recent call last):
        File "/Users/julo9057/oa-venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/julo9057/oa-venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/julo9057/oa-venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/fj/nxxmv5353nj2t68jvxn1wc4w0000gp/T/pip-build-env-reba_ihs/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 334, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/fj/nxxmv5353nj2t68jvxn1wc4w0000gp/T/pip-build-env-reba_ihs/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 304, in _get_build_requires
          self.run_setup()
        File "/private/var/folders/fj/nxxmv5353nj2t68jvxn1wc4w0000gp/T/pip-build-env-reba_ihs/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 320, in run_setup
          exec(code, locals())
        File "<string>", line 292, in <module>
      ValueError: did not find netCDF version 4 headers
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

[notice] A new release of pip is available: 23.2.1 -> 24.3.1
[notice] To update, run: pip install --upgrade pip
(oa-venv) (base) julo9057@cu-vpn-nsidc-172 ~ % 

@eigenbeam
Copy link
Contributor

Is the Python you are using installed via the anaconda distribution? If so, I think the conflict may be that anaconda appears to have a version of the native NetCDF lib installed that is incompatible. Are you able to install using a python that is not from anaconda distribution? There are various ways to do this that I'd be happy to help with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Ops Testing Feedback from Ops testing
Projects
None yet
Development

No branches or pull requests

2 participants