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

ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed #288

Open
z575 opened this issue Sep 14, 2024 · 14 comments

Comments

@z575
Copy link

z575 commented Sep 14, 2024

I get an error when I import pycolmap==3.10.0
ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed

@sarlinpe
Copy link
Member

We need more information:

  • was pycolmap built from source or installed with PyPI wheels?
  • detailed system specifications
  • exact steps to reproduce the issue
  • full error log

Thank you!

@z575
Copy link
Author

z575 commented Sep 15, 2024

  1. Installed through PyPI wheels(pip install pycolmap );
  2. The operating system is win11, and the processor is Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz 1.19 GHz;
  3. I have also used other computers to install pycolmap (3.10.0), all of which have errors when importing (import pycolmap), and the versions of python are 3.8.2 and 3.12.0
  4. The error log is:Traceback (most recent call last):
    File "d:\Program Files\Python312\Lib\runpy.py", line 198, in _run_module_as_main
    return _run_code(code, main_globals, None,
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "d:\Program Files\Python312\Lib\runpy.py", line 88, in run_code
    exec(code, run_globals)
    File"c:\Users****.vscode\extensions\ms-python.debugpy-2024.10.0-win32-x64\bundled\libs\debugpy\adapter/../..\debugpy
    \launcher/../..\debugpy_main
    .py", line 39, in
    cli.main()
    File "c:\Users*.vscode\extensions\ms-python.debugpy-2024.10.0-win32-x64\bundled\libs\debugpy\adapter/../..\debugpy
    \launcher/../..\debugpy/..\debugpy\server\cli.py", line 430, in main
    run()
    File "c:\Users*
    .vscode\extensions\ms-python.debugpy-2024.10.0-win32-x64\bundled\libs\debugpy\adapter/../..\debugpy
    \launcher/../..\debugpy/..\debugpy\server\cli.py", line 284, in run_file
    runpy.run_path(target, run_name="main")
    File "c:\Users*.vscode\extensions\ms-python.debugpy-2024.10.0-win32-x64\bundled\libs\debugpy_vendored\pydevd_pyd
    evd_bundle\pydevd_runpy.py", line 321, in run_path
    return _run_module_code(code, init_globals, run_name,
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "c:\Users*
    .vscode\extensions\ms-python.debugpy-2024.10.0-win32-x64\bundled\libs\debugpy_vendored\pydevd_pyd
    evd_bundle\pydevd_runpy.py", line 135, in _run_module_code
    _run_code(code, mod_globals, init_globals,
    File "c:\Users*.vscode\extensions\ms-python.debugpy-2024.10.0-win32-x64\bundled\libs\debugpy_vendored\pydevd_pyd
    evd_bundle\pydevd_runpy.py", line 124, in _run_code
    exec(code, run_globals)
    File "c:\Users*
    \Desktop****\test.py", line 4, in
    import pycolmap
    ImportError: DLL load failed while importing pycolmap: A dynamic link library (DLL) initialization routine failed。
    Thank you!

@trappa-create
Copy link

Hei,

I'm also trying to install pycolmap trough pip install.
the installation seems to be sucesfull but when importing i get the following error

ImportError: DLL load failed while importing pycolmap: A dynamic link library (DLL) initialization routine failed.
Capture

are there any other specific requirements? (I've tried multiple times to uninstall and reinstall too)

@rsbspark03
Copy link

Facing the same issue!

@spomichter
Copy link

spomichter commented Oct 22, 2024

Also getting this error. Win11, Python 3.12.7. PyPi wheels.

@andysfd
Copy link

andysfd commented Oct 22, 2024

same, any fixes?

@z575
Copy link
Author

z575 commented Oct 22, 2024

You can try lowering the version of pycolmap

@andysfd
Copy link

andysfd commented Oct 22, 2024

worked with manuel download of whl and downgraded python version (3.11)

@spomichter
Copy link

worked with manuel download of whl and downgraded python version (3.11)

This did not work for me despite downgrading to python 3.11.

ImportError: DLL load failed while importing pycolmap: A dynamic link library (DLL) initialization routine failed.

@sarlinpe
Copy link
Member

We have Windows wheels for both 3.10 and 0.6.1, does any of them work? Could you also try the wheels at HEAD that are available here?

One way to debug this is the following (I don't have a Windows machine so I cannot run this myself):

  1. Download a Windows wheel from PyPi: https://pypi.org/project/pycolmap/#files
  2. Unzip the .whl file
  3. Run dumpbin /dependents pycolmap.cp312-win_amd64.pyd
  4. Check which one of the dependencies cannot be found in pycolmap-3.10.0.data/platlib/

@spomichter
Copy link

We have Windows wheels for both 3.10 and 0.6.1, does any of them work? Could you also try the wheels at HEAD that are available here?

One way to debug this is the following (I don't have a Windows machine so I cannot run this myself):

  1. Download a Windows wheel from PyPi: https://pypi.org/project/pycolmap/#files
  2. Unzip the .whl file
  3. Run dumpbin /dependents pycolmap.cp312-win_amd64.pyd
  4. Check which one of the dependencies cannot be found in pycolmap-3.10.0.data/platlib/

I tried the .\pycolmap-3.10.0-cp311-cp311-win_amd64.whl wheel at HEAD and it failed with the same issue

@norangehere
Copy link

I fix this problem by running conda install -c conda-forge pycolmap

@sarlinpe
Copy link
Member

sarlinpe commented Nov 8, 2024

Unfortunately I cannot help without the information from these debug steps:

  1. Download a Windows wheel from PyPi: https://pypi.org/project/pycolmap/#files
  2. Unzip the .whl file
  3. Run dumpbin /dependents pycolmap.cp312-win_amd64.pyd
  4. Check which one of the dependencies cannot be found in pycolmap-3.10.0.data/platlib/

@mganglb
Copy link

mganglb commented Nov 11, 2024

@sarlinpe I hoe this helps to resolve this issue.

Win11Pro

Wheel for Python 3.10

dumpbin /dependents pycolmap.cp310-win_amd64.pyd
Microsoft (R) COFF/PE Dumper Version 14.35.32215.0
Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file pycolmap.cp310-win_amd64.pyd

File Type: DLL

  Image has the following dependencies:

    python310.dll
    boost_program_options-vc144-mt-x64-1_85-607efac39c17f2790759bb2b5838ad4c.dll
    lz4-7f77700e54387258a64ad7aca8017328.dll
    ceres-525554d7a2160a294d02ceac1e5b839f.dll
    FreeImage-4d048f4ecdf08910551dd1d2df1bbd9f.dll
    glog-6fd14a048b4bb4a86f8e038bf1031620.dll
    boost_filesystem-vc144-mt-x64-1_85-f4f81897df9db59b7c69358ed9b29aed.dll
    sqlite3-c19a43661229c6df5a0f45ff5449d57c.dll
    KERNEL32.dll
    msvcp140-354ba23d00509943c1f14972cbebde2c.dll
    vcomp140-8a6328b999684c5720952a651c616fa4.dll
    VCRUNTIME140_1.dll
    VCRUNTIME140.dll
    api-ms-win-crt-runtime-l1-1-0.dll
    api-ms-win-crt-heap-l1-1-0.dll
    api-ms-win-crt-string-l1-1-0.dll
    api-ms-win-crt-stdio-l1-1-0.dll
    api-ms-win-crt-filesystem-l1-1-0.dll
    api-ms-win-crt-math-l1-1-0.dll
    api-ms-win-crt-locale-l1-1-0.dll
    api-ms-win-crt-utility-l1-1-0.dll
    api-ms-win-crt-time-l1-1-0.dll
    api-ms-win-crt-convert-l1-1-0.dll

  Summary

       20000 .data
       27000 .pdata
       95000 .rdata
        2000 .reloc
        1000 .rsrc
      63D000 .text
D:\dev\pycolmap\pycolmap-3.10.0-cp310-cp310-win_amd64\pycolmap-3.10.0.data\platlib

boost_filesystem-vc144-mt-x64-1_85-f4f81897df9db59b7c69358ed9b29aed.dll
boost_program_options-vc144-mt-x64-1_85-607efac39c17f2790759bb2b5838ad4c.dll
ceres-525554d7a2160a294d02ceac1e5b839f.dll
deflate-3545979afde1a06c6b723f91a1ef0d25.dll
FreeImage-4d048f4ecdf08910551dd1d2df1bbd9f.dll
gflags-88c303414d4dc78f5e4b02e6b225f7c9.dll
glog-6fd14a048b4bb4a86f8e038bf1031620.dll
Iex-3_2-3d2fe5e3ace75df49d22127f8f752a0c.dll
IlmThread-3_2-5a693915a3a9e0a28029f92c1542eff5.dll
Imath-3_1-79116fc09da3f4856e0e4be648d628ac.dll
jpeg62-0b824c53d9227a34aa7485094102adcb.dll
lcms2-aeea1289af27dee3e2c0341922b3d115.dll
libamd-5457fde7574cf531511658ec951b35fd.dll
libcamd-1dad87f09eb16958f5d33024f3238a2e.dll
libccolamd-e56cc57306ec3cdda1e0096032b485aa.dll
libcholmod-e23623eea46a3bb419add82ece3629d6.dll
libcolamd-befc1da672668a0052827659b9a888ea.dll
libgcc_s_seh-1-1a6a3ffc779ffca2e2680f5ccce530de.dll
libgfortran-5-1433bf2fc9362157088b7323782cd327.dll
liblapack-9e6fc6515aa84ee3ae4d02e164a1616d.dll
liblzma-84f04e8f635fb0c31441f50d6f2d30c1.dll
libpng16-e1e5c3dce37b0c160e9a7641116e21ed.dll
libquadmath-0-f35ef621b617d5b1bedda957cd47034d.dll
libsharpyuv-f28d2210263fae9891a24b630c01cf96.dll
libspqr-7b88152bbb1c8452ed7561ec3e4ef7cb.dll
libwebp-395d6792ebecb15ce53aabc2ff926556.dll
libwebpdecoder-f4ffb1405879ae136abbec098beb6ec2.dll
libwebpmux-f88319f33baec7ce87f3f314b009dafd.dll
libwinpthread-1-747825cbaa4dbe2782431fcf59477996.dll
lz4-7f77700e54387258a64ad7aca8017328.dll
msvcp140-354ba23d00509943c1f14972cbebde2c.dll
openblas-5d6589bf4eda049935d13a6cf7a5cfc7.dll
OpenEXR-3_2-8674d13fbb0f8af2785bef98e0c0064c.dll
OpenEXRCore-3_2-fb8e71d641af19404a2c0970c13a8ff6.dll
openjp2-4ac9a0b05ead35df52a04f2b52be6827.dll
raw-0aafa44631cc6e81bbe4bb6a82d43c83.dll
sqlite3-c19a43661229c6df5a0f45ff5449d57c.dll
tiff-a43edaa4a7826dd9653774cb1f2e2558.dll
vcomp140-8a6328b999684c5720952a651c616fa4.dll
zlib1-fd5b818af4340bd9d620db087e9093a2.dll

missing:

KERNEL32.dll
VCRUNTIME140_1.dll
api-ms-win-crt-runtime-l1-1-0.dll
api-ms-win-crt-heap-l1-1-0.dll
api-ms-win-crt-string-l1-1-0.dll
api-ms-win-crt-stdio-l1-1-0.dll
api-ms-win-crt-filesystem-l1-1-0.dll
api-ms-win-crt-math-l1-1-0.dll
api-ms-win-crt-locale-l1-1-0.dll
api-ms-win-crt-utility-l1-1-0.dll
api-ms-win-crt-time-l1-1-0.dll
api-ms-win-crt-convert-l1-1-0.dll

Wheel for Python 3.11

dumpbin /dependents pycolmap.cp311-win_amd64.pyd
Microsoft (R) COFF/PE Dumper Version 14.35.32215.0
Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file pycolmap.cp311-win_amd64.pyd

File Type: DLL

  Image has the following dependencies:

    python311.dll
    boost_program_options-vc144-mt-x64-1_85-607efac39c17f2790759bb2b5838ad4c.dll
    lz4-7f77700e54387258a64ad7aca8017328.dll
    ceres-525554d7a2160a294d02ceac1e5b839f.dll
    FreeImage-4d048f4ecdf08910551dd1d2df1bbd9f.dll
    glog-6fd14a048b4bb4a86f8e038bf1031620.dll
    boost_filesystem-vc144-mt-x64-1_85-f4f81897df9db59b7c69358ed9b29aed.dll
    sqlite3-c19a43661229c6df5a0f45ff5449d57c.dll
    KERNEL32.dll
    msvcp140-354ba23d00509943c1f14972cbebde2c.dll
    vcomp140-8a6328b999684c5720952a651c616fa4.dll
    VCRUNTIME140_1.dll
    VCRUNTIME140.dll
    api-ms-win-crt-runtime-l1-1-0.dll
    api-ms-win-crt-heap-l1-1-0.dll
    api-ms-win-crt-string-l1-1-0.dll
    api-ms-win-crt-stdio-l1-1-0.dll
    api-ms-win-crt-filesystem-l1-1-0.dll
    api-ms-win-crt-math-l1-1-0.dll
    api-ms-win-crt-locale-l1-1-0.dll
    api-ms-win-crt-utility-l1-1-0.dll
    api-ms-win-crt-time-l1-1-0.dll
    api-ms-win-crt-convert-l1-1-0.dll

  Summary

       20000 .data
       27000 .pdata
       95000 .rdata
        2000 .reloc
        1000 .rsrc
      63D000 .text
D:\dev\pycolmap\pycolmap-3.10.0-cp311-cp311-win_amd64\pycolmap-3.10.0.data\platlib

boost_filesystem-vc144-mt-x64-1_85-f4f81897df9db59b7c69358ed9b29aed.dll
boost_program_options-vc144-mt-x64-1_85-607efac39c17f2790759bb2b5838ad4c.dll
ceres-525554d7a2160a294d02ceac1e5b839f.dll
deflate-3545979afde1a06c6b723f91a1ef0d25.dll
FreeImage-4d048f4ecdf08910551dd1d2df1bbd9f.dll
gflags-88c303414d4dc78f5e4b02e6b225f7c9.dll
glog-6fd14a048b4bb4a86f8e038bf1031620.dll
Iex-3_2-3d2fe5e3ace75df49d22127f8f752a0c.dll
IlmThread-3_2-5a693915a3a9e0a28029f92c1542eff5.dll
Imath-3_1-79116fc09da3f4856e0e4be648d628ac.dll
jpeg62-0b824c53d9227a34aa7485094102adcb.dll
lcms2-aeea1289af27dee3e2c0341922b3d115.dll
libamd-5457fde7574cf531511658ec951b35fd.dll
libcamd-1dad87f09eb16958f5d33024f3238a2e.dll
libccolamd-e56cc57306ec3cdda1e0096032b485aa.dll
libcholmod-e23623eea46a3bb419add82ece3629d6.dll
libcolamd-befc1da672668a0052827659b9a888ea.dll
libgcc_s_seh-1-1a6a3ffc779ffca2e2680f5ccce530de.dll
libgfortran-5-1433bf2fc9362157088b7323782cd327.dll
liblapack-9e6fc6515aa84ee3ae4d02e164a1616d.dll
liblzma-84f04e8f635fb0c31441f50d6f2d30c1.dll
libpng16-e1e5c3dce37b0c160e9a7641116e21ed.dll
libquadmath-0-f35ef621b617d5b1bedda957cd47034d.dll
libsharpyuv-f28d2210263fae9891a24b630c01cf96.dll
libspqr-7b88152bbb1c8452ed7561ec3e4ef7cb.dll
libwebp-395d6792ebecb15ce53aabc2ff926556.dll
libwebpdecoder-f4ffb1405879ae136abbec098beb6ec2.dll
libwebpmux-f88319f33baec7ce87f3f314b009dafd.dll
libwinpthread-1-747825cbaa4dbe2782431fcf59477996.dll
lz4-7f77700e54387258a64ad7aca8017328.dll
msvcp140-354ba23d00509943c1f14972cbebde2c.dll
openblas-5d6589bf4eda049935d13a6cf7a5cfc7.dll
OpenEXR-3_2-8674d13fbb0f8af2785bef98e0c0064c.dll
OpenEXRCore-3_2-fb8e71d641af19404a2c0970c13a8ff6.dll
openjp2-4ac9a0b05ead35df52a04f2b52be6827.dll
raw-0aafa44631cc6e81bbe4bb6a82d43c83.dll
sqlite3-c19a43661229c6df5a0f45ff5449d57c.dll
tiff-a43edaa4a7826dd9653774cb1f2e2558.dll
vcomp140-8a6328b999684c5720952a651c616fa4.dll
zlib1-fd5b818af4340bd9d620db087e9093a2.dll

Missing

KERNEL32.dll
VCRUNTIME140_1.dll
api-ms-win-crt-runtime-l1-1-0.dll
api-ms-win-crt-heap-l1-1-0.dll
api-ms-win-crt-string-l1-1-0.dll
api-ms-win-crt-stdio-l1-1-0.dll
api-ms-win-crt-filesystem-l1-1-0.dll
api-ms-win-crt-math-l1-1-0.dll
api-ms-win-crt-locale-l1-1-0.dll
api-ms-win-crt-utility-l1-1-0.dll
api-ms-win-crt-time-l1-1-0.dll
api-ms-win-crt-convert-l1-1-0.dll

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

8 participants