pycolmap icon indicating copy to clipboard operation
pycolmap copied to clipboard

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

Open z575 opened this issue 1 year ago • 14 comments

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

z575 avatar Sep 14 '24 09:09 z575

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!

sarlinpe avatar Sep 14 '24 16:09 sarlinpe

  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!

z575 avatar Sep 15 '24 05:09 z575

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)

trappa-create avatar Oct 15 '24 14:10 trappa-create

Facing the same issue!

rsbspark03 avatar Oct 20 '24 03:10 rsbspark03

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

spomichter avatar Oct 22 '24 09:10 spomichter

same, any fixes?

andysfd avatar Oct 22 '24 11:10 andysfd

You can try lowering the version of pycolmap

z575 avatar Oct 22 '24 11:10 z575

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

andysfd avatar Oct 22 '24 12:10 andysfd

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.

spomichter avatar Oct 23 '24 04:10 spomichter

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/

sarlinpe avatar Oct 23 '24 21:10 sarlinpe

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

spomichter avatar Oct 24 '24 01:10 spomichter

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

norangehere avatar Nov 08 '24 03:11 norangehere

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/

sarlinpe avatar Nov 08 '24 10:11 sarlinpe

@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

mganglb avatar Nov 11 '24 08:11 mganglb