netcdf4-python icon indicating copy to clipboard operation
netcdf4-python copied to clipboard

import error - Library not loaded: @loader_path/libzip.5.5.dylib (no suitable image found)

Open isx2015 opened this issue 1 year ago • 2 comments

Operating system: MacOS Mojave 10.14.6 netCDF4 Version: 1.6.5 Python 3.11.4

unable to import netCDF4:

>>> import netCDF4
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/easy/co/descartes/venv/lib/python3.11/site-packages/netCDF4/__init__.py", line 3, in <module>
    from ._netCDF4 import *
ImportError: dlopen(/Users/easy/co/descartes/venv/lib/python3.11/site-packages/netCDF4/_netCDF4.cpython-311-darwin.so, 2): Library not loaded: @loader_path/libzip.5.5.dylib
  Referenced from: /Users/easy/co/descartes/venv/lib/python3.11/site-packages/netCDF4/.dylibs/libnetcdf.19.dylib
  Reason: no suitable image found.  Did find:
	/Users/easy/co/descartes/venv/lib/python3.11/site-packages/netCDF4/.dylibs/libzip.5.5.dylib: cannot load 'libzip.5.5.dylib' (load command 0x80000034 is unknown)
	/Users/easy/co/descartes/venv/lib/python3.11/site-packages/netCDF4/.dylibs/libzip.5.5.dylib: cannot load 'libzip.5.5.dylib' (load command 0x80000034 is unknown)

isx2015 avatar Feb 04 '24 06:02 isx2015

How was netcdf4-python installed? (pip install, conda, from source?)

jswhit avatar Feb 04 '24 22:02 jswhit

How was netcdf4-python installed? (pip install, conda, from source?)

I have tried to install from both pip and from source. seems like a MacOS problem? (too old) I had to work on Linux.

isx2015 avatar Feb 05 '24 03:02 isx2015