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

ImportError On clean installation in virtual enviroment #296

Open
mattiasotgia opened this issue Jul 15, 2023 · 2 comments
Open

ImportError On clean installation in virtual enviroment #296

mattiasotgia opened this issue Jul 15, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@mattiasotgia
Copy link

Describe the bug
Running

import exoplanet as xo

Trigger an ImportError with trace

ImportError: dlopen(./exoplanet/lib/python3.9/site-packages/netCDF4/_netCDF4.cpython-39-darwin.so, 2): Library not loaded: @loader_path/libzip.5.5.dylib
  Referenced from: ./exoplanet/lib/python3.9/site-packages/netCDF4/.dylibs/libnetcdf.19.dylib
  Reason: no suitable image found.  Did find:
	./exoplanet/lib/python3.9/site-packages/netCDF4/.dylibs/libzip.5.5.dylib: cannot load 'libzip.5.5.dylib' (load command 0x80000034 is unknown)
	./exoplanet/lib/python3.9/site-packages/netCDF4/.dylibs/libzip.5.5.dylib: cannot load 'libzip.5.5.dylib' (load command 0x80000034 is unknown)

To Reproduce
The only code run is

python3.9 -m venv exoplanets
python3.9 -m pip install -U "exoplanet[extras]"

and then

import exoplanet as xo

Expected behavior
To import the package

Your setup (please complete the following information):

  • Version of exoplanet: latest (0.5.3)
  • Operating system: macOs (python venv)
  • Python version & installation method (pip, conda, etc.): python 3.9.12, installed throught pip

Additional context
None

@mattiasotgia mattiasotgia added the bug Something isn't working label Jul 15, 2023
@dfm
Copy link
Member

dfm commented Jul 15, 2023

This is an issue with the installation of netCDF4 (which is an indirect dependency via arviz), rather than exoplanet directly. I've also previously found that the pip binary wheel for mac is broken and fixed it by installing netCDF4 with conda (conda install -c conda-forge netcdf4), but there might be other ways to get an installation that works!

@mattiasotgia
Copy link
Author

Ok great news I'll try!
Thanks for the quick reply and good work!

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

No branches or pull requests

2 participants