flatironinstitute / CaImAn

Computational toolbox for large scale Calcium Imaging Analysis, including movie handling, motion correction, source extraction, spike deconvolution and result visualization.
https://caiman.readthedocs.io
GNU General Public License v2.0
639 stars 370 forks source link

The following packages are causing the inconsistency: - defaults/osx-arm64::conda-build==24.1.2=py311hca03da5_0 #1424

Open noah08642 opened 4 days ago

noah08642 commented 4 days ago

Please fill in the following for any issues

Your setup:

  1. Operating System (Linux, MacOS, Windows): MacOS
  2. Hardware type (x86, ARM..) and RAM: M2 8 gb RAM
  3. Python Version (e.g. 3.9): 3.11.5
  4. Caiman version (e.g. 1.9.12): N/A
  5. Which demo exhibits the problem (if applicable): installing mamba
  6. How you installed Caiman (pure conda, conda + compile, colab, ..): n/a
  7. Details:

When I install mamba it gives me the error message in the title: The following packages are causing the inconsistency: - defaults/osx-arm64::conda-build==24.1.2=py311hca03da5_0.

It then tries flexible solves and says the following: The following packages are causing the inconsistency:

If I press y and install it then every terminal command becomes accompanied by the following error:

(base) lukerichards@Lukes-MacBook-Air-44 ~ % conda info Error while loading conda entry point: conda-libmamba-solver (dlopen(/opt/anaconda3/lib/python3.11/site-packages/libmambapy/bindings.cpython-311-darwin.so, 0x0002): Library not loaded: @rpath/libarchive.13.dylib Referenced from: <786901D8-233E-321D-AFC2-8B22834C23E5> /opt/anaconda3/lib/libmamba.2.0.0.dylib Reason: tried: '/opt/anaconda3/lib/libarchive.13.dylib' (no such file), '/opt/anaconda3/lib/python3.11/site-packages/libmambapy/../../../libarchive.13.dylib' (no such file), '/opt/anaconda3/lib/python3.11/site-packages/libmambapy/../../../libarchive.13.dylib' (no such file), '/opt/anaconda3/bin/../lib/libarchive.13.dylib' (no such file), '/opt/anaconda3/bin/../lib/libarchive.13.dylib' (no such file), '/usr/local/lib/libarchive.13.dylib' (no such file), '/usr/lib/libarchive.13.dylib' (no such file, not in dyld cache)) Error while loading conda entry point: conda-libmamba-solver (dlopen(/opt/anaconda3/lib/python3.11/site-packages/libmambapy/bindings.cpython-311-darwin.so, 0x0002): Library not loaded: @rpath/libarchive.13.dylib Referenced from: <786901D8-233E-321D-AFC2-8B22834C23E5> /opt/anaconda3/lib/libmamba.2.0.0.dylib Reason: tried: '/opt/anaconda3/lib/libarchive.13.dylib' (no such file), '/opt/anaconda3/lib/python3.11/site-packages/libmambapy/../../../libarchive.13.dylib' (no such file), '/opt/anaconda3/lib/python3.11/site-packages/libmambapy/../../../libarchive.13.dylib' (no such file), '/opt/anaconda3/bin/../lib/libarchive.13.dylib' (no such file), '/opt/anaconda3/bin/../lib/libarchive.13.dylib' (no such file), '/usr/local/lib/libarchive.13.dylib' (no such file), '/usr/lib/libarchive.13.dylib' (no such file, not in dyld cache))

When I download Caiman and import it in my IDE, I get the error:

Cell In[1], line 1 import caiman

File /opt/anaconda3/lib/python3.11/site-packages/caiman/init.py:4 from caiman.base.movies import movie, load, load_movie_chain, _load_behavior, play_movie

File /opt/anaconda3/lib/python3.11/site-packages/caiman/base/movies.py:9 import cv2

ImportError: dlopen(/opt/anaconda3/lib/python3.11/site-packages/cv2.cpython-311-darwin.so, 0x0002): Library not loaded: @rpath/liblapack.3.dylib Referenced from: <3B76A893-D747-3B28-9708-479C48E77CB6> /opt/anaconda3/lib/libopencv_core.4.9.0.dylib Reason: tried: '/opt/anaconda3/lib/liblapack.3.dylib' (no such file), '/opt/anaconda3/lib/liblapack.3.dylib' (no such file), '/opt/anaconda3/lib/python3.11/site-packages/../../liblapack.3.dylib' (no such file), '/opt/anaconda3/lib/python3.11/site-packages/../../liblapack.3.dylib' (no such file), '/opt/anaconda3/bin/../lib/liblapack.3.dylib' (no such file), '/opt/anaconda3/bin/../lib/liblapack.3.dylib' (no such file), '/usr/local/lib/liblapack.3.dylib' (no such file), '/usr/lib/liblapack.3.dylib' (no such file, not in dyld cache)

If I try to install lapack directly, I get the following:

(base) lukerichards@Lukes-MacBook-Air-44 ~ % conda install -c conda-forge lapack

Error while loading conda entry point: conda-libmamba-solver (dlopen(/opt/anaconda3/lib/python3.11/site-packages/libmambapy/bindings.cpython-311-darwin.so, 0x0002): Library not loaded: @rpath/libarchive.19.dylib Referenced from: <027768CD-20C9-3E75-850D-35E842A32FA5> /opt/anaconda3/lib/libmamba.2.0.0.dylib Reason: tried: '/opt/anaconda3/lib/libarchive.19.dylib' (no such file), '/opt/anaconda3/lib/python3.11/site-packages/libmambapy/../../../libarchive.19.dylib' (no such file), '/opt/anaconda3/lib/python3.11/site-packages/libmambapy/../../../libarchive.19.dylib' (no such file), '/opt/anaconda3/bin/../lib/libarchive.19.dylib' (no such file), '/opt/anaconda3/bin/../lib/libarchive.19.dylib' (no such file), '/usr/local/lib/libarchive.19.dylib' (no such file), '/usr/lib/libarchive.19.dylib' (no such file, not in dyld cache)) Error while loading conda entry point: conda-libmamba-solver (dlopen(/opt/anaconda3/lib/python3.11/site-packages/libmambapy/bindings.cpython-311-darwin.so, 0x0002): Library not loaded: @rpath/libarchive.19.dylib Referenced from: <027768CD-20C9-3E75-850D-35E842A32FA5> /opt/anaconda3/lib/libmamba.2.0.0.dylib Reason: tried: '/opt/anaconda3/lib/libarchive.19.dylib' (no such file), '/opt/anaconda3/lib/python3.11/site-packages/libmambapy/../../../libarchive.19.dylib' (no such file), '/opt/anaconda3/lib/python3.11/site-packages/libmambapy/../../../libarchive.19.dylib' (no such file), '/opt/anaconda3/bin/../lib/libarchive.19.dylib' (no such file), '/opt/anaconda3/bin/../lib/libarchive.19.dylib' (no such file), '/usr/local/lib/libarchive.19.dylib' (no such file), '/usr/lib/libarchive.19.dylib' (no such file, not in dyld cache))

CondaValueError: You have chosen a non-default solver backend (libmamba) but it was not recognized. Choose one of: classic

(base) lukerichards@Lukes-MacBook-Air-44 ~ %

I've already restarted my base and tried a similar route, but I have no clue what to do. I'm happy to restart anything or redownload anaconda, but hopefully there's a better solution. Thanks.

pgunn commented 4 days ago

I'll need to write new install instructions; nowadays I recommend miniforge, which will avoid issues with installing mamba (as it's already present with that distribution of conda) and will avoid most packages from the defaults channel.

noah08642 commented 3 days ago

Hi, thanks for the tip. Could you share some basic instructions for someone unfamiliar with using mini forge?

pgunn commented 3 days ago

The new instructions would look roughly like this:

Don't start with the normal anaconda or miniconda installers; instead do a websearch for miniforge3 and install that (if someone doesn't have any environments they care about but has anaconda3/miniconda3, they can carefully remove that first, including .condarc, the data dirs, and the shell dotfile integration).

After installing miniforge3 and opening a new shell, they'll have a mamba command as well as the conda command and can follow through the existing caiman instructions but skipping up until the parts right after installing mamba; everything after that should be the same.