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 while loading conda entry point: conda-libmamba-solver #599

Closed
2 tasks done
rgoubet opened this issue Jan 10, 2025 · 6 comments
Closed
2 tasks done

Error while loading conda entry point: conda-libmamba-solver #599

rgoubet opened this issue Jan 10, 2025 · 6 comments
Labels
type::bug describes erroneous operation, use severity::* to classify the type

Comments

@rgoubet
Copy link

rgoubet commented Jan 10, 2025

Checklist

  • I added a descriptive title
  • I searched open reports and couldn't find a duplicate

What happened?

I'm currently experiencing the same issue as reported here: #540

I made a new, clean install of miniconda on a new computer. Several days later, after running conda update --all, the process ended with Error while loading conda entry point: conda-libmamba-solver (DLL load failed while importing bindings: module cannot be found.)

Even setting the solver back to classic and restarting a new prompt does not resolve the issue.

Conda Info

active environment : base
    active env location : C:\Users\user\miniconda3
            shell level : 1
       user config file : C:\Users\user\.condarc
 populated config files : C:\Users\user\miniconda3\.condarc
                          C:\Users\user\.condarc
          conda version : 24.11.3
    conda-build version : not installed
         python version : 3.12.8.final.0
                 solver : classic
       virtual packages : __archspec=1=x86_64_v4
                          __conda=24.11.3=0
                          __win=0=0
       base environment : C:\Users\user\miniconda3  (writable)
      conda av data dir : C:\Users\user\miniconda3\etc\conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/win-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
          package cache : C:\Users\user\miniconda3\pkgs
                          C:\Users\user\.conda\pkgs
                          C:\Users\user\AppData\Local\conda\conda\pkgs
       envs directories : C:\Users\user\miniconda3\envs
                          C:\Users\user\.conda\envs
                          C:\Users\user\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/24.11.3 requests/2.32.3 CPython/3.12.8 Windows/11 Windows/10.0.26100 aau/0.5.0 c/. s/. e/.
          administrator : False
             netrc file : None
           offline mode : False

Conda Config

==> C:\Users\user\miniconda3\.condarc <==
channels:
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - https://repo.anaconda.com/pkgs/msys2

==> C:\Users\user\.condarc <==
channel_priority: strict
channels:
  - conda-forge
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - https://repo.anaconda.com/pkgs/msys2
solver: classic

Conda list

A very long list

Additional Context

No response

@rgoubet rgoubet added the type::bug describes erroneous operation, use severity::* to classify the type label Jan 10, 2025
@github-project-automation github-project-automation bot moved this to 🆕 New in 🧭 Planning Jan 10, 2025
@jaimergp
Copy link
Contributor

You are not using solver: libmamba so the error shouldn't be critical. That said, the conda list output is necessary for us to determine what might be causing this issue. I'm fearing you are mixing conda-forge and defaults which might have resulted in the libarchive issue (although I hadn't seen that on Windows).

Can you:

  1. Provide the output of conda list -n base
  2. Paste the output of python -c "import libmambapy".

Thanks.

@rgoubet
Copy link
Author

rgoubet commented Jan 11, 2025

As I explained, I reverted the solver to classic (otherwise, when running conda install, I get CondaValueError: You have chosen a non-default solver backend (libmamba) but it was not recognized. Choose one of: classic), but it didn't make a difference.

When running python -c "import libmambapy", it returns: ImportError: DLL load failed while importing bindings: module cannot be found.

I add the very long list of packages as a file.

base.txt

@jaimergp
Copy link
Contributor

I add the very long list of packages as a file.

As suspected there's a mix of conda-forge and defaults (although primarily conda-forge). This is not supported and bound to break at some point. If you are willing to reinstall your base environment, starting from Miniforge would be more desirable for you (given your prevalence of conda-forge packages).

We are preparing some tooling to make this easier, but it's not ready yet. What I can recommend:

  1. Backup your base environment as a lockfile: conda list -n base --explicit --md5 > base.lockfile.txt
  2. Backup your (other) important environments. You can list them with conda info --envs. Then go name by name and run this command for each of them: ``conda list -n name-goes-here --explicit --md5 > name-goes-here.lockfile.txt`
  3. Uninstall Miniconda with the included uninstaller.
  4. Download and install Miniforge.
  5. Restore any desired environments back: conda create --name name-goes-here --file name-goes-here.lockfile.txt. This also applies to your old base, which I recommend creating with a different name (e.g. as default or main or something).

@rgoubet
Copy link
Author

rgoubet commented Jan 11, 2025

I'm not willing to use miniforge. When setting up miniconda, I make conda-forge the priority environment before any other operation. Note that, when executing mamba, I get a Windows dialog error that liblzma.dll cannot be found. Two copies of the file can be found in miniconda3\pkgs\liblzma-5.6.3-h2466b09_1\Library\bin\liblzma.dll and miniconda3\pkgs\xz-5.4.6-h8cc25b3_1\Library\bin\liblzma.dll, but don't know where else it's supposed to be.

At this point, I'll just reinstall miniconda entirely. conda install --force-reinstall -y conda-forge::libmambapy has been running for 2 hours, trying to resolve dependencies, so a full reinstall will be faster.

@jaimergp
Copy link
Contributor

I'm not willing to use miniforge.

I can't recommend using conda-forge on top of Miniconda. It's not guaranteed to work and, as you are seeing, you end up running into problems. You can try to install packages without running the solver by specifying the URL directly. For xz, you can get it from https://anaconda.org/conda-forge/xz/files. For liblzma, https://anaconda.org/conda-forge/liblzma/files. Start with the versions you found in the pkgs/ cache (5.4.6 and 5.6.3, respectively).

@rgoubet
Copy link
Author

rgoubet commented Jan 20, 2025

Based on more tests, I'm starting to believe that my company's antivirus is occasionally removing files. It uses a reputation-based engine, so, sometimes, recent binaries are not recognized and are removed. They no longer are after a few days. So I'll close this as it is probably unrelated to the earlier report of the same error.

@rgoubet rgoubet closed this as completed Jan 20, 2025
@github-project-automation github-project-automation bot moved this from 🆕 New to 🏁 Done in 🧭 Planning Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type::bug describes erroneous operation, use severity::* to classify the type
Projects
Status: 🏁 Done
Development

No branches or pull requests

2 participants