peterkuma / ccplot

Command-line application for visualizing data from CloudSat and CALIPSO satellites
http://ccplot.org
Other
35 stars 7 forks source link

from ccplot.hdf import HDF .... >>> hdf.cpython-38-darwin.so, 0x0002): symbol not found #11

Closed joaquinezcurra closed 2 years ago

joaquinezcurra commented 2 years ago

Hello Peter. Congratulations on pushing ccplot 2.0 with cartopy! I wanted to let you know there seems to be an issue with HDF and Apple Silicon M1, as per the following error message:

Traceback (most recent call last): File "/Users/joaquinx/opt/anaconda3/bin/ccplot", line 63, in <module> from ccplot.hdf import HDF ImportError: dlopen(/Users/joaquinx/opt/anaconda3/lib/python3.8/site-packages/ccplot/hdf.cpython-38-darwin.so, 0x0002): symbol not found in flat namespace '_HEstring'

It only happens on my arm based M1 MB Air, as I was able to uninstall ccplot v1.5.6 and succesfully install and run v2.0.0 on an Intel MB Air.

Don't know if it helps, I did a little research and it seems M1 support has just recently been added to the HDF5 codebase as per this forum thread.

peterkuma commented 2 years ago

Hi Joaquin, unfortunately I am not sure if I can help much here. It might be because Anaconda Python is x86, whereas macports is compiling the packages for arm64. You could try uninstalling the packages and ccplot and then opening an arm64 shell (Rosetta 2) and installing everything again:

sudo port uninstall jpeg hdf4 hdfeos
pip uninstall ccplot
arch -x86_64 zsh
sudo port install jpeg hdf4 hdfeos
pip install ccplot

HDF5 is not used by ccplot. It only uses HDF4 and HDF-EOS2. According to the macports website they are both available for macOS Monterey (arm64).

joaquinezcurra commented 2 years ago

Hello Peter! Reporting with good news from the Silicon M1 architecture. After updating to v2.1.0, the error message is gone and ccplot runs like a charm. Thank you.

peterkuma commented 2 years ago

Awesome!