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

Error when Following the Build Backend Tutorial #13

Open
WarrenZhu050413 opened this issue Jun 22, 2024 · 7 comments
Open

Error when Following the Build Backend Tutorial #13

WarrenZhu050413 opened this issue Jun 22, 2024 · 7 comments
Assignees

Comments

@WarrenZhu050413
Copy link
Collaborator

Issue

I encountered an issue while trying to create a new conda environment using the causalimages::BuildBackend function. The process fails with the following error:

Error while loading conda entry point: conda-libmamba-solver (dlopen(/Users/wz/opt/anaconda3/lib/python3.9/site-packages/libmambapy/bindings.cpython-39-darwin.so, 0x0002): Library not loaded: @rpath/libarchive.19.dylib
  Referenced from: <0A274167-3E38-3A79-BEF4-748CC0170E30> /Users/wz/opt/anaconda3/lib/libmamba.2.0.0.dylib
  Reason: tried: '/Users/wz/opt/anaconda3/lib/libarchive.19.dylib' (no such file), '/Users/wz/opt/anaconda3/lib/python3.9/site-packages/libmambapy/../../../libarchive.19.dylib' (no such file), '/Users/wz/opt/anaconda3/lib/python3.9/site-packages/libmambapy/../../../libarchive.19.dylib' (no such file), '/Users/wz/opt/anaconda3/bin/../lib/libarchive.19.dylib' (no such file), '/Users/wz/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

What I did

  1. I ran 'which conda' on my terminal which returned the file address '/Users/wz/opt/anaconda3/bin/conda'
  2. I then ran causalimages::BuildBackend function with the following command:
    causalimages::BuildBackend(conda = "/Users/wz/opt/anaconda3/bin/conda")
  3. This triggers the command:
    /Users/wz/opt/anaconda3/bin/conda create --yes --name CausalImagesEnv 'python=3.11' --quiet -c conda-forge
  4. The error is then displayed.

System Information:

  • macOS Sonoma 14.2.1
  • Anaconda version: 24.3.0

I'm not sure how to fix this error. Maybe it is some problem with how I am managing my Anaconda environment. Thanks for helping!

@cjerzak cjerzak self-assigned this Jun 26, 2024
@cjerzak
Copy link
Owner

cjerzak commented Jul 3, 2024

I will send you in a minute a script that manually re-creates the environment we can do further testing on. My best guess is that we might need to set some R environmental variables to tell R and/or conda where to find some LD libraries. What happens when you just try causalimages::BuildBackend()?

@WarrenZhu050413
Copy link
Collaborator Author

+ /Users/wz/opt/anaconda3/bin/conda create --yes --name CausalImagesEnv 'python=3.11' --quiet -c conda-forge
Error while loading conda entry point: conda-libmamba-solver (dlopen(/Users/wz/opt/anaconda3/lib/python3.9/site-packages/libmambapy/bindings.cpython-39-darwin.so, 0x0002): Library not loaded: @rpath/libarchive.19.dylib
  Referenced from: <0A274167-3E38-3A79-BEF4-748CC0170E30> /Users/wz/opt/anaconda3/lib/libmamba.2.0.0.dylib
  Reason: tried: '/Users/wz/opt/anaconda3/lib/libarchive.19.dylib' (no such file), '/Users/wz/opt/anaconda3/lib/python3.9/site-packages/libmambapy/../../../libarchive.19.dylib' (no such file), '/Users/wz/opt/anaconda3/lib/python3.9/site-packages/libmambapy/../../../libarchive.19.dylib' (no such file), '/Users/wz/opt/anaconda3/bin/../lib/libarchive.19.dylib' (no such file), '/Users/wz/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

Error: Error creating conda environment 'CausalImagesEnv' [exit code 1]```

@cjerzak
Copy link
Owner

cjerzak commented Jul 3, 2024

What happens if you try to build a new environment using conda from the terminal? If that succeeds but the BuildBackend() call fails, the problem likely lies in the setting of environmental variables within R.

@WarrenZhu050413
Copy link
Collaborator Author

WarrenZhu050413 commented Jul 3, 2024 via email

@cjerzak
Copy link
Owner

cjerzak commented Jul 3, 2024

Sounds good! Was this the BuildBackend() or Python way?

@WarrenZhu050413
Copy link
Collaborator Author

WarrenZhu050413 commented Jul 3, 2024 via email

@cjerzak
Copy link
Owner

cjerzak commented Jul 3, 2024

Cool. If the BuildBackend way doesn't work that's an indication that we need to tweak the environmental variables R is using.

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

2 participants