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

[fix] Mac M3 Setup: Couldnt install OpenCV and confirm installation version #122

Open
xnanodax opened this issue Jan 14, 2025 · 0 comments

Comments

@xnanodax
Copy link

xnanodax commented Jan 14, 2025

Just went through installation and trying to remember what I did to fix my set up. By now, I've closed some terminals so I am not able to trace back exactly what I did. I'm hoping these steps can help someone out there.

Issue 1

Couldnt install conda install -c conda-forge opencv===4.5.3

Error while loading conda entry point: conda-libmamba-solver (dlopen(/Users/<user>/miniconda3/lib/python3.10/site-packages/libmambapy/bindings.cpython-310-darwin.so, 0x0002): Library not loaded: @rpath/libarchive.19.dylib Referenced from: <C6FFB0DE-2F95-397A-80F7-4F74339F6DC5> /Users/<user>/miniconda3/lib/libmamba.2.0.0.dylib Reason: tried: '/Users/<user>/miniconda3/lib/libarchive.19.dylib' (no such file), '/Users/<user>/miniconda3/lib/python3.10/site-packages/libmambapy/../../../libarchive.19.dylib' (no such file), '/Users/<user>/miniconda3/lib/python3.10/site-packages/libmambapy/../../../libarchive.19.dylib' (no such file), '/Users/<user>/miniconda3/bin/../lib/libarchive.19.dylib' (no such file), '/Users/<user>/miniconda3/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

Fix
$ conda install --solver=classic conda-forge::conda-libmamba-solver conda-forge::libmamba conda-forge::libmambapy conda-forge::libarchive

Issue 2

After installing OpenCV successfully, I couldnt check my OpenCV version python -c "import cv2; print(cv2.__version__)"

Received the following stack trace:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: dlopen(/Users/cynthiama/miniconda3/envs/mlep-w1-lab/lib/python3.8/site-packages/cv2.cpython-38-darwin.so, 0x0002): Library not loaded: @rpath/liblapack.3.dylib
  Referenced from: <A2784E06-8E0A-3B5C-B262-0BCE2AAF2DCF> /Users/cynthiama/miniconda3/envs/mlep-w1-lab/lib/libopencv_core.4.5.3.dylib
  Reason: tried: '/Users/cynthiama/miniconda3/envs/mlep-w1-lab/lib/liblapack.3.dylib' (no such file), '/Users/cynthiama/miniconda3/envs/mlep-w1-lab/lib/liblapack.3.dylib' (no such file), '/Users/cynthiama/miniconda3/envs/mlep-w1-lab/lib/python3.8/site-packages/../../liblapack.3.dylib' (no such file), '/Users/cynthiama/miniconda3/envs/mlep-w1-lab/lib/python3.8/site-packages/../../liblapack.3.dylib' (no such file), '/Users/cynthiama/miniconda3/envs/mlep-w1-lab/bin/../lib/liblapack.3.dylib' (no such file), '/Users/cynthiama/miniconda3/envs/mlep-w1-lab/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)

Fix conda install python=3.10
I had to downgrade python versions

@xnanodax xnanodax changed the title [fix] Mac M3 Setup: Couldnt install OpenCV and confirmation installation [fix] Mac M3 Setup: Couldnt install OpenCV and confirm installation version Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant