cositools / cosipy

The COSI high-level data analysis tools
Apache License 2.0
3 stars 16 forks source link

h5py pip installation issue #174

Closed israelmcmc closed 2 months ago

israelmcmc commented 2 months ago

Hi @israelmcmc. Following your advice I tried unsetting HEADAS and I believe that worked.

However, I then had another installation issue since I was missing hdf5 library. Specifically, I had to install the library via conda (i.e., conda install h5py) and the installation looks to have completed fine. Installing via pip (i.e., pip install h5py) didn't work, but I think it would have worked if I also properly set HDF5_DIR environment variable to point to where the hdf5 header file would be. I'm not sure if it is mentioned anywhere that hdf5 is required for cosipy (or maybe everyone has it and I just didn't for some reason).

(Also, sorry if this is the wrong thread to attach this to!)

Originally posted by @mikemoss3 in https://github.com/cositools/cosipy/issues/173#issuecomment-2045399011

israelmcmc commented 2 months ago

@mikemoss3 Can you share the error message that you are seeing, please? h5py is automatically installed with cosipy (as a derived requirement of histpy). However, that's all through pip, which you mentioned didn't work for you.

mikemoss3 commented 2 months ago

@israelmcmc luckily, I saved this error message as well! (see attached file) install-error-hdf5.txt

Let me know if I can provide any further information.

israelmcmc commented 2 months ago

Thanks @mikemoss3! One last thing, please. Which system are you using? And if macos, do you have an M1 chip?

mikemoss3 commented 2 months ago

Yes, I am on MacOS and it's the Apple M1 Pro chip.

Yong2Sheng commented 2 months ago

I have the same issue with the M1 Mac.

israelmcmc commented 2 months ago

I think this is related to these issue(s) in h5py: https://github.com/h5py/h5py/issues/1810 https://github.com/h5py/h5py/issues/1800

It seems that at the moment there's no good solution other than asking the M1 users to install HDF5 either through homebrew or conda.

I added this info to the installation instructions. I'm closing this issue since once the h5py developer fix this, it will automatically propagate to the cosipy installation.