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

Triqs/Jupyter installation order using Anaconda on MacOS #922

Closed
Crampon16 opened this issue Oct 5, 2023 · 9 comments
Closed

Triqs/Jupyter installation order using Anaconda on MacOS #922

Crampon16 opened this issue Oct 5, 2023 · 9 comments

Comments

@Crampon16
Copy link

I am using minconda3 to install triqs on a MacBook. Installing triqs first prevents later installation of Jupyter. The other way around works fine.

Steps to Reproduce

  1. Download conda. I used [https://docs.conda.io/projects/miniconda/en/latest/]
  2. conda install -c conda-forge triqs
  3. conda install jupyter

Expected behavior:
I can run jupyter notebook and import triqs inside.

Actual behavior:
I get the following error message:

(base) liam.rampon@ ~ % conda install jupyter
Error while loading conda entry point: conda-libmamba-solver (dlopen(/Users/liam.rampon/miniconda3/lib/python3.11/site-packages/libmambapy/bindings.cpython-311-darwin.so, 0x0002): Library not loaded: @rpath/libarchive.19.dylib
  Referenced from: <02C528AB-0A0D-32BE-8F88-DB5C6474982C> /Users/liam.rampon/miniconda3/lib/libmamba.2.0.0.dylib
  Reason: tried: '/Users/liam.rampon/miniconda3/lib/libarchive.19.dylib' (no such file), '/Users/liam.rampon/miniconda3/lib/python3.11/site-packages/libmambapy/../../../libarchive.19.dylib' (no such file), '/Users/liam.rampon/miniconda3/lib/python3.11/site-packages/libmambapy/../../../libarchive.19.dylib' (no such file), '/Users/liam.rampon/miniconda3/bin/../lib/libarchive.19.dylib' (no such file), '/Users/liam.rampon/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))
Collecting package metadata (current_repodata.json): done
Solving environment: unsuccessful initial attempt using frozen solve. Retrying with flexible solve.
Solving environment: unsuccessful attempt using repodata from current_repodata.json, retrying with next repodata source.

ResolvePackageNotFound: 
  - conda==23.5.2

Versions

Latest triqs version I suppose ?
I am running this on a completely clean (nothing except triqs has been installed yet) M1 MacBook Air Sonoma. I got a similar issue on an Intel MacBook Pro running MacOS Sierra then Big Sur.

Additional Information

In the case I described but also when installing jupyter first then triqs (which successfully installs both), any later call to conda will display the error message

Error while loading conda entry point: conda-libmamba-solver (dlopen(/Users/liam.rampon/miniconda3/lib/python3.11/site-packages/libmambapy/bindings.cpython-311-darwin.so, 0x0002): Library not loaded: @rpath/libarchive.19.dylib
  Referenced from: <02C528AB-0A0D-32BE-8F88-DB5C6474982C> /Users/liam.rampon/miniconda3/lib/libmamba.2.0.0.dylib
  Reason: tried: '/Users/liam.rampon/miniconda3/lib/libarchive.19.dylib' (no such file), '/Users/liam.rampon/miniconda3/lib/python3.11/site-packages/libmambapy/../../../libarchive.19.dylib' (no such file), '/Users/liam.rampon/miniconda3/lib/python3.11/site-packages/libmambapy/../../../libarchive.19.dylib' (no such file), '/Users/liam.rampon/miniconda3/bin/../lib/libarchive.19.dylib' (no such file), '/Users/liam.rampon/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))
@Wentzell
Copy link
Member

Wentzell commented Oct 5, 2023

Dear @Crampon16

Thank you for pointing out this issue.

Do you get the same Problem if you do not install TRIQS at all?

@Wentzell
Copy link
Member

Wentzell commented Oct 5, 2023

I personally can't reproduce the issues on my M1 MacBook Pro.

We are investigating your problem.

@Thoemi09
Copy link
Contributor

Thoemi09 commented Oct 5, 2023

Dear @Crampon16,

I assume you installed everything into the conda base environment? Can you try installing triqs and jupyter into a new environment? So after installing miniconda, you could do something like

conda create -n triqs
conda activate triqs
conda install jupyter
conda install -c conda-forge triqs

Note, if you install triqs before jupyter, you need to install jupyter from conda-forge, i.e.
conda install -c conda-forge jupyter

@Crampon16
Copy link
Author

@Wentzell
Installing Jupyter first (in the base environment) does not seem to break things, and notebooks look usable.

@Thoemi09
Using your commands and creating triqs in a separate environment removes completely the conda error message about libmamba and dynamic libraries, and the installation works.
Installing jupyter from conda-forge makes it possible to complete the installation, but the error message stays.

I also just checked and the error message also appears if I install mamba using conda install -c conda-forge mamba in the base environment. Maybe this is actually not a triqs problem ?

@Thoemi09
Copy link
Contributor

Thoemi09 commented Oct 5, 2023

Installing jupyter from conda-forge makes it possible to complete the installation, but the error message stays.

Do you still get the error message in a separate environment? Or just in the base?

I also just checked and the error message also appears if I install mamba using conda install -c conda-forge mamba in the base environment. Maybe this is actually not a triqs problem ?

Yes, I think so too. I can reproduce similar errors when installing other packages in the base env. I don't think it is written somewhere explicitly, but it is probably best to always create separate environments when possible.

@Crampon16
Copy link
Author

I just checked, installing triqs then jupyter, both through conda-forge, in a separate environment yields no error message.

Except if you have further tests to propose, I think we can close this.
Thanks for your help !

@Thoemi09
Copy link
Contributor

Thoemi09 commented Oct 6, 2023

No problem!

Just to wrap things up: The error seems to be related to: conda-forge/libarchive-feedstock#69, which comes from a general compatibility issue between conda-forge and the defaults channel as described in https://conda-forge.org/docs/user/tipsandtricks.html.

In fact, adding conda-forge as a channel and setting the channel priority to strict before installing triqs and jupyter gets rid of the error message, even in the base env:

conda config --add channels conda-forge
conda config --set channel_priority strict
conda install triqs
conda install jupyter

However, it is recommended to use new environments anyway (see https://conda-forge.org/docs/user/introduction.html).

@Wentzell
Copy link
Member

Wentzell commented Oct 6, 2023

Thank you @Thoemi09 for the clarifications, and for providing instructions for a workaround!

This looks to be more of an anaconda issue than a triqs issue, so we are closing this.

@Wentzell Wentzell closed this as completed Oct 6, 2023
@Wentzell
Copy link
Member

Wentzell commented Oct 6, 2023

We updated the documentation accordingly 39e0506

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

3 participants