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

Installation issues - HDF5 and conda #967

Closed
rweigel opened this issue Aug 8, 2024 · 3 comments
Closed

Installation issues - HDF5 and conda #967

rweigel opened this issue Aug 8, 2024 · 3 comments
Labels
Documentation Examples, notebooks, installation guides, webinars, etc onboarding Issues pertaining to helping new pyspedas or new python users up the learning curve python Issues involving Python and Python-related tools outside of pyspedas

Comments

@rweigel
Copy link

rweigel commented Aug 8, 2024

I tried pip install pyspedas and got the following error. I was not able to find "HDF5" in a search at https://pyspedas.readthedocs.io/en/latest/index.html. I was able to install after executing brew install hdf5. Perhaps document this requirement?

I also tried conda install spedas::pyspedas but got PackagesNotFoundError. Not sure why this did not work.

  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [13 lines of output]
      /var/folders/jt/sdjwwwys0y5_8p3glv8cmjnw0000gn/T/H5closeoquozx_g.c:1:10: fatal error: 'H5public.h' file not found
      #include "H5public.h"
               ^~~~~~~~~~~~
      1 error generated.
      cpuinfo failed, assuming no CPU features: 'flags'
      * Using Python 3.10.14 (main, Mar 21 2024, 11:21:31) [Clang 14.0.6 ]
      * Found cython 3.0.11
      * USE_PKGCONFIG: False
      * Found conda env: ``/opt/miniconda3/envs/python3.10.14``
      .. ERROR:: Could not find a local HDF5 installation.
         You may need to explicitly state where your local HDF5 headers and
         library can be found by setting the ``HDF5_DIR`` environment
         variable or by using the ``--hdf5`` command-line option.
      [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.
@jameswilburlewis jameswilburlewis added Documentation Examples, notebooks, installation guides, webinars, etc python Issues involving Python and Python-related tools outside of pyspedas onboarding Issues pertaining to helping new pyspedas or new python users up the learning curve labels Aug 8, 2024
@jameswilburlewis
Copy link
Contributor

Hi Bob,

Yes, we've run across that ourselves in the past. pyspedas and pytplot-mpl-temp don't depend directly on hdf5...it's a few layers deeper in the dependency tree, and I think it's only a compile-time dependency rather than a runtime requirement (maybe why it's not listed as an explicit dependency on NetCDF4, tables, or whatever package it's trying to compile).

Relevant issues (one open, one closed):
#792
#873

pyspedas isn't available yet as a conda package. I think we need to get the geopack package on conda before that can happen.

Related issues for pyspedas on conda:
#496
#275

We have been making a big push, since before PyHC summer school, to improve our new user onboarding experience, including walking folks who may be new to Python through installing Python itself, setting up a Python development environment, and installing/configuring pyspedas. As you've seen, we still have a lot of work to do in that department...

One aspect of that will be what to do if some outside package can't be installed cleanly via pip: that's kind of a tall order because setting up compiler tools and installing necessary prerequisite libraries is so platform-dependent. Having been through some of that already on my Mac, it's difficult to go back and recreate the new user experience for the purpose of documenting the steps, without undoing all the effort I've made to get everything working. But, we recognize the need and we're working on it!

Related issue:
#623

It does sound like you were able to get past the issue with "brew install hdf5". We were also able to solve it by doing "conda install h5py", as described in issue 792.

By all means, please do let us know if you encounter any other installation or configuration hiccups!

@rweigel
Copy link
Author

rweigel commented Aug 9, 2024

Thanks, and I apologize for not searching the issues for "hdf5" - I only searched the documentation and Google for " pyspedas hdf5." (I told students to do in the summer school to search issues before posting, so do as I say, I guess)

@jameswilburlewis
Copy link
Contributor

No worries...actually, it's useful for us to know that it's still an issue, and that we'll probably be dealing with it for a while still.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Examples, notebooks, installation guides, webinars, etc onboarding Issues pertaining to helping new pyspedas or new python users up the learning curve python Issues involving Python and Python-related tools outside of pyspedas
Projects
None yet
Development

No branches or pull requests

2 participants