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

Mamba throws `ImportError: DLL load failed..." on a fresh install. #2770

Closed
2 tasks done
simonrp84 opened this issue Aug 22, 2023 · 8 comments
Closed
2 tasks done

Mamba throws `ImportError: DLL load failed..." on a fresh install. #2770

simonrp84 opened this issue Aug 22, 2023 · 8 comments

Comments

@simonrp84
Copy link

Troubleshooting docs

  • My problem is not solved in the Troubleshooting docs

How did you install Mamba?

Mambaforge

Search tried in issue tracker

Yes

Latest version of Mamba

  • My problem is not solved with the latest version

Tried in Conda?

Not applicable

Describe your issue

I installed mamba via the windows mambaforge package and this was successful. I then ran mamba update --all and this was also successful.

But, when I try to install a package after this (let's say mamba install numpy) I get:

(base) C:\Users\Simon>mamba install numpy
Traceback (most recent call last):
  File "C:\Users\Simon\mambaforge\Scripts\mamba-script.py", line 6, in <module>
    from mamba.mamba import main
  File "C:\Users\Simon\mambaforge\lib\site-packages\mamba\mamba.py", line 49, in <module>
    import libmambapy as api
  File "C:\Users\Simon\mambaforge\lib\site-packages\libmambapy\__init__.py", line 7, in <module>
    raise e
  File "C:\Users\Simon\mambaforge\lib\site-packages\libmambapy\__init__.py", line 4, in <module>
    from libmambapy.bindings import *  # noqa: F401,F403
ImportError: DLL load failed while importing bindings: The specified module could not be found.

I have also tried with a fresh miniconda install followed by conda install mamba then mamba install numpy and I see the same issue.

mamba info / micromamba info

I cannot post the results of this as the `mamba info` command throws `ImportError`

Logs

Same error message as posted above.

environment.yml

N/A, this is a `base` environment in a fresh install.

~/.condarc

channels:
  - conda-forge
  - defaults
channel_priority: strict
verbosity: 0
solver: classic
@simonrp84
Copy link
Author

Small update, having looked into this a bit more it seems the problem is coming from libsolv, which is being changed from libsolv=0.7.24=h12be248_1 to libsolv=0.7.24=h12be248_2:

  • If I update libsolv alone then I get the above error.
  • If I pin libsolv=0.7.24=h12be248_1 then I can run mamba update --all on the other packages (libmamba, wheel, etc) without any problem.

@jonashaag
Copy link
Collaborator

Can you please show the logs of the update so that we can see what packages were updated

@simonrp84
Copy link
Author

Sorry, should've thought of that.
Doing mamba update --all --dry-run on a fresh install shows:

conda-forge/win-64                                          Using cache
conda-forge/noarch                                          Using cache
pkgs/msys2/win-64                                             No change
pkgs/main/noarch                                              No change
pkgs/main/win-64                                              No change
pkgs/r/win-64                                                 No change
pkgs/msys2/noarch                                             No change
pkgs/r/noarch                                                 No change

Pinned packages:
  - python 3.10.*


Transaction

  Prefix: C:\Users\Simon\mambaforge2

  Updating specs:

   - boltons
   - brotli-python
   - bzip2
   - ca-certificates
   - certifi
   - cffi
   - charset-normalizer
   - colorama
   - conda
   - conda-libmamba-solver
   - conda-package-handling
   - conda-package-streaming
   - cryptography
   - fmt
   - idna
   - jsonpatch
   - jsonpointer
   - krb5
   - libarchive
   - libcurl
   - libffi
   - libiconv
   - libmamba
   - libmambapy
   - libsolv
   - libsqlite
   - libssh2
   - libxml2
   - libzlib
   - lz4-c
   - lzo
   - mamba
   - menuinst
   - miniforge_console_shortcut
   - openssl
   - packaging
   - pip
   - pluggy
   - pybind11-abi
   - pycosat
   - pycparser
   - pyopenssl
   - pysocks
   - python
   - python_abi
   - reproc
   - reproc-cpp
   - requests
   - ruamel.yaml
   - ruamel.yaml.clib
   - setuptools
   - tk
   - toolz
   - tqdm
   - tzdata
   - ucrt
   - urllib3
   - vc
   - vc14_runtime
   - vs2015_runtime
   - wheel
   - win_inet_pton
   - xz
   - yaml-cpp
   - zstandard
   - zstd
   - ca-certificates
   - certifi
   - openssl


  Package                       Version  Build            Channel                 Size
----------------------------------------------------------------------------------------
  Change:
----------------------------------------------------------------------------------------

  - libsolv                      0.7.24  h12be248_1       conda-forge
  + libsolv                      0.7.24  h12be248_2       conda-forge/win-64     750kB

  Upgrade:
----------------------------------------------------------------------------------------

  - conda                        23.3.1  py310h5588dad_0  conda-forge
  + conda                        23.7.2  py310h5588dad_0  conda-forge/win-64       1MB
  - conda-libmamba-solver        23.3.0  pyhd8ed1ab_0     conda-forge
  + conda-libmamba-solver        23.7.0  pyhd8ed1ab_0     conda-forge/noarch      42kB
  - libmamba                      1.4.2  h8a7d157_0       conda-forge
  + libmamba                      1.4.9  ha24f096_0       conda-forge/win-64       3MB
  - libmambapy                    1.4.2  py310h3fe4c2e_0  conda-forge
  + libmambapy                    1.4.9  py310h3fe4c2e_0  conda-forge/win-64     454kB
  - mamba                         1.4.2  py310hd9d798f_0  conda-forge
  + mamba                         1.4.9  py310hd9d798f_0  conda-forge/win-64      68kB
  - miniforge_console_shortcut      1.0  h57928b3_0       conda-forge
  + miniforge_console_shortcut      2.0  h57928b3_1       conda-forge/win-64      16kB
  - wheel                        0.41.1  pyhd8ed1ab_0     conda-forge
  + wheel                        0.41.2  pyhd8ed1ab_0     conda-forge/noarch      57kB

  Summary:

  Change: 1 packages
  Upgrade: 7 packages

  Total download: 6MB

----------------------------------------------------------------------------------------

Doing mamba update libsolv (i.e: Only the troublesome package) shows:

Looking for: ['libsolv']

pkgs/r/win-64                                      742.8kB @ 767.8kB/s  1.0s
pkgs/main/noarch                                   852.1kB @ 834.4kB/s  1.1s
pkgs/msys2/noarch                                  111.0 B @  98.0 B/s  0.1s
pkgs/msys2/win-64                                   39.8kB @  32.2kB/s  0.1s
pkgs/r/noarch                                        1.3MB @ 503.7kB/s  1.6s
pkgs/main/win-64                                     5.3MB @   1.0MB/s  5.4s
conda-forge/noarch                                  13.8MB @   1.4MB/s 10.9s
conda-forge/win-64                                  21.7MB @   1.8MB/s 13.1s

Pinned packages:
  - python 3.10.*


Transaction

  Prefix: C:\Users\Simon\mambaforge2

  Updating specs:

   - libsolv
   - ca-certificates
   - certifi
   - openssl


  Package    Version  Build       Channel                 Size
----------------------------------------------------------------
  Change:
----------------------------------------------------------------

  - libsolv   0.7.24  h12be248_1  conda-forge
  + libsolv   0.7.24  h12be248_2  conda-forge/win-64     750kB

  Summary:

  Change: 1 packages

  Total download: 750kB

----------------------------------------------------------------

@jonashaag
Copy link
Collaborator

Did you read this?

Did you perform a search with your error message?

@simonrp84
Copy link
Author

Yes.

@jonashaag
Copy link
Collaborator

I'm pretty sure it's a dupe of #1728. Closing as such.

@jonashaag
Copy link
Collaborator

jonashaag commented Aug 22, 2023

While the symptoms are the same, I actually don't think it's the same problem as #1728. Sorry for prematurely closing this issue.

In any case you should not have checked the troubleshooting checkbox while still using the default channels, @simonrp84.

@jonashaag jonashaag reopened this Aug 22, 2023
@jonashaag
Copy link
Collaborator

This should be fixed by the latest libsolv build

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