Skip to content

srreal DLL not loading properly on windows #81

Description

@sbillinge

Problem

I am getting this when I try and run tests in pdfbl-sequential on windows:

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
#!/usr/bin/env python
##############################################################################
#
# diffpy.srreal by DANSE Diffraction group
# Simon J. L. Billinge
# (c) 2010 The Trustees of Columbia University
# in the City of New York. All rights reserved.
#
# File coded by: Pavol Juhas
#
# See AUTHORS.txt for a list of people who contributed.
# See LICENSE_DANSE.txt for license information.
#
##############################################################################
"""
Top-level classes for PDF calculation:
DebyePDFCalculator -- simulate PDF by evaluating Debye sum in Q-space
PDFCalculator -- calculate PDF by peak summation in real space
"""
> from diffpy.srreal.srreal_ext import (
DebyePDFCalculator,
PDFCalculator,
fftftog,
fftgtof,
)
E ImportError: DLL load failed while importing srreal_ext: The specified module could not be found.
..\..\micromamba\envs\pdfbl\Lib\site-packages\diffpy\srreal\pdfcalculator.py:21: ImportError
====================================================== short test summary info ======================================================
FAILED tests/test_pdfadapter.py::test_pdfadapter - ImportError: DLL load failed while importing srreal_ext: The specified module could not be found.
FAILED tests/test_sequential_cmi_runner.py::test_load_inputs_bad - ImportError: DLL load failed while importing srreal_ext: The specified module could not be found.
FAILED tests/test_sequential_cmi_runner.py::test_run_sequential_cmi_runner - ImportError: DLL load failed while importing srreal_ext: The specified module could not be found.
FAILED tests/test_sequential_cmi_runner.py::test_data_for_plot - ImportError: DLL load failed while importing srreal_ext: The specified module could not be found.
========================================================= 4 failed in 7.15s =========================================================

Proposed solution

Figure out why and fix it. Here is the env list:

List of packages in environment: "C:\\Users\\simon\\micromamba\\envs\\pdfbl"
Name Version Build Channel
------------------------------------------------------------------------
arrow 1.4.0 py312haa95532_0 pkgs/main
bg-mpl-stylesheets 0.5.1 pyhff2d567_0 conda-forge
binaryornot 0.4.4 pyhd3eb1b0_1 pkgs/main
blas 1.0 mkl pkgs/main
brotlicffi 1.2.0.0 py312h885b0b7_0 pkgs/main
bzip2 1.0.8 h2bbff1b_6 pkgs/main
ca-certificates 2025.12.2 haa95532_0 pkgs/main
cairo 1.18.4 he9e932c_0 pkgs/main
certifi 2026.01.04 py312haa95532_0 pkgs/main
cffi 2.0.0 py312h02ab6af_1 pkgs/main
cfgv 3.5.0 py312haa95532_0 pkgs/main
chardet 5.2.0 py312haa95532_0 pkgs/main
charset-normalizer 3.4.4 py312haa95532_0 pkgs/main
click 8.2.1 py312haa95532_1 pkgs/main
codecov 2.1.11 pyhd3eb1b0_0 pkgs/main
colorama 0.4.6 py312haa95532_0 pkgs/main
contourpy 1.3.3 py312h214f63a_0 pkgs/main
cookiecutter 2.6.0 py312haa95532_1 pkgs/main
coverage 7.11.0 py312h630b2a1_1 pkgs/main
cycler 0.12.1 py312haa95532_0 pkgs/main
diffpy.cmi 3.1.2 pyhd8ed1ab_0 conda-forge
diffpy.srfit 3.2.0 pyhd8ed1ab_0 conda-forge
diffpy.srreal 1.4.0 py312h0e1366e_3 conda-forge
diffpy.structure 3.3.1 pyhd8ed1ab_0 conda-forge
diffpy.utils 3.7.1 pyhd8ed1ab_0 conda-forge
distlib 0.4.0 py312h02ab6af_0 pkgs/main
dlfcn-win32 1.4.2 hac47afa_0 conda-forge
expat 2.7.4 hd7fb8db_0 pkgs/main
filelock 3.20.3 py312haa95532_0 pkgs/main
flake8 7.3.0 py312haa95532_0 pkgs/main
fontconfig 2.15.0 hd211d86_0 pkgs/main
fonttools 4.61.0 py312h02ab6af_0 pkgs/main
freetype 2.14.1 hfbffc0b_0 pkgs/main
gh 2.86.0 h36e2d1d_0 conda-forge
graphite2 1.3.14 hd77b12b_1 pkgs/main
greenlet 3.2.4 py312h885b0b7_0 pkgs/main
gsl 2.7.1 h6051b90_1 pkgs/main
harfbuzz 12.3.0 h3ef6528_1 pkgs/main
icc_rt 2022.1.0 h6049295_2 pkgs/main
icu 73.1 h6c2663c_0 pkgs/main
identify 2.5.5 py312haa95532_0 pkgs/main
idna 3.11 py312haa95532_0 pkgs/main
iniconfig 2.3.0 py312haa95532_0 pkgs/main
intel-openmp 2025.0.0 haa95532_1164 pkgs/main
jinja2 3.1.6 py312haa95532_0 pkgs/main
jpeg 9f ha349fce_0 pkgs/main
kiwisolver 1.4.9 py312h03f52e7_0 pkgs/main
lcms2 2.16 hb4a4139_0 pkgs/main
lerc 3.0 hd77b12b_0 pkgs/main
libboost 1.88.0 h3d2b97d_0 pkgs/main
libboost-python 1.88.0 py312he783f19_0 pkgs/main
libdeflate 1.17 h2bbff1b_1 pkgs/main
libdiffpy 1.4.1 h29e0fdf_1 conda-forge
libexpat 2.7.4 hd7fb8db_0 pkgs/main
libffi 3.4.4 hd77b12b_1 pkgs/main
libglib 2.86.3 h9bccc14_0 pkgs/main
libhwloc 2.12.1 default_hfa10c62_1000 pkgs/main
libiconv 1.16 h2bbff1b_3 pkgs/main
libkrb5 1.22.1 hb237eb7_0 pkgs/main
libobjcryst 2024.2.1 h26c23d0_1 conda-forge
libpng 1.6.54 ha15c746_0 pkgs/main
libpq 17.6 h64815fc_1 pkgs/main
libtiff 4.5.1 hd77b12b_0 pkgs/main
libwebp-base 1.6.0 hbf3958f_0 pkgs/main
libxml2 2.13.9 h6201b9f_0 pkgs/main
libzlib 1.3.1 h02ab6af_0 pkgs/main
lz4-c 1.9.4 h2bbff1b_1 pkgs/main
markdown-it-py 4.0.0 py312haa95532_1 pkgs/main
markupsafe 3.0.2 py312h827c3e9_0 pkgs/main
matplotlib 3.10.8 py312haa95532_0 pkgs/main
matplotlib-base 3.10.8 py312h26e45b9_0 pkgs/main
mccabe 0.7.0 pyhd3eb1b0_0 pkgs/main
mdurl 0.1.2 py312haa95532_0 pkgs/main
mkl 2025.0.0 h5da7b33_930 pkgs/main
mkl-service 2.5.2 py312h0b37514_0 pkgs/main
mkl_fft 2.1.1 py312h300f80d_0 pkgs/main
mkl_random 1.3.0 py312ha5e6156_0 pkgs/main
mysql-common 9.3.0 hc394544_4 pkgs/main
mysql-libs 9.3.0 h58c8544_4 pkgs/main
nodeenv 1.9.1 py312haa95532_0 pkgs/main
numpy 2.4.2 py312h22cce72_0 pkgs/main
numpy-base 2.4.2 py312h1df51cf_0 pkgs/main
openjpeg 2.5.2 hae555c5_0 pkgs/main
openssl 3.0.19 hbb43b14_0 pkgs/main
packaging 25.0 py312haa95532_1 pkgs/main
pcre2 10.46 h5740b90_0 pkgs/main
pdfbl.sequential 0.0.1 pypi_0 pypi
periodictable 2.0.2 py312haa95532_0 pkgs/main
pillow 11.1.0 py312h096bfcc_0 pkgs/main
pip 26.0.1 pyhc872135_0 pkgs/main
pixman 0.46.4 h4043f72_0 pkgs/main
platformdirs 4.5.0 py312haa95532_0 pkgs/main
pluggy 1.5.0 py312haa95532_0 pkgs/main
ply 3.11 py312haa95532_1 pkgs/main
pre-commit 3.4.0 py312haa95532_1 pkgs/main
prettytable 3.16.0 py312haa95532_0 pkgs/main
prompt-toolkit 3.0.52 py312haa95532_1 pkgs/main
prompt_toolkit 3.0.52 hd3eb1b0_1 pkgs/main
psutil 7.0.0 py312h02ab6af_1 pkgs/main
pycifrw 5.0.1 py312he06e257_0 conda-forge
pycodestyle 2.14.0 py312haa95532_0 pkgs/main
pycparser 2.23 py312haa95532_0 pkgs/main
pyflakes 3.4.0 py312haa95532_0 pkgs/main
pygments 2.19.2 py312haa95532_0 pkgs/main
pyobjcryst 2025.1.0 py312h0e1366e_1 conda-forge
pyparsing 3.2.5 py312haa95532_0 pkgs/main
pyqt 6.9.1 py312h12ec796_0 pkgs/main
pyqt6-sip 13.10.2 py312h630b2a1_0 pkgs/main
pysocks 1.7.1 py312haa95532_1 pkgs/main
pytest 9.0.2 py312haa95532_0 pkgs/main
pytest-cov 7.0.0 py312haa95532_0 pkgs/main
pytest-env 1.2.0 pyhd8ed1ab_0 conda-forge
python 3.12.12 h716150d_1 pkgs/main
python-dateutil 2.9.0post0 py312haa95532_2 pkgs/main
python-slugify 8.0.4 py312haa95532_0 pkgs/main
python-tzdata 2025.3 pyhd3eb1b0_0 pkgs/main
python_abi 3.12 3_cp312 pkgs/main
pyyaml 6.0.3 py312hb9a58be_0 pkgs/main
qtbase 6.9.2 h3266e9d_6 pkgs/main
qtdeclarative 6.9.2 h88b4c33_1 pkgs/main
qtsvg 6.9.2 h30ace32_1 pkgs/main
qttools 6.9.2 h7e7b719_1 pkgs/main
qtwebchannel 6.9.2 heb02b0b_1 pkgs/main
qtwebsockets 6.9.2 heb02b0b_1 pkgs/main
requests 2.32.5 py312haa95532_1 pkgs/main
rich 14.2.0 py312haa95532_0 pkgs/main
scikit-package 0.2.1 pyhd8ed1ab_1 conda-forge
scipy 1.16.3 py312hbd6d557_0 pkgs/main
setuptools 80.10.2 py312haa95532_0 pkgs/main
sip 6.12.0 py312h706e071_0 pkgs/main
six 1.17.0 py312haa95532_0 pkgs/main
sqlalchemy 2.0.45 py312hda9a48d_0 pkgs/main
sqlite 3.51.1 hda9a48d_0 pkgs/main
tbb 2022.3.0 h90c84d6_0 pkgs/main
tbb-devel 2022.3.0 h90c84d6_0 pkgs/main
text-unidecode 1.3 pyhd3eb1b0_0 pkgs/main
tk 8.6.15 hf199647_0 pkgs/main
toml 0.10.2 pyhd3eb1b0_0 pkgs/main
tomli 2.4.0 py312haa95532_0 pkgs/main
tornado 6.5.4 py312h02ab6af_0 pkgs/main
typing-extensions 4.15.0 py312haa95532_0 pkgs/main
typing_extensions 4.15.0 py312haa95532_0 pkgs/main
tzdata 2025c he532380_0 pkgs/main
ucrt 10.0.22621.0 haa95532_0 pkgs/main
ukkonen 1.0.1 py312h214f63a_1 pkgs/main
urllib3 2.6.3 py312haa95532_0 pkgs/main
vc 14.3 h2df5915_10 pkgs/main
vc14_runtime 14.44.35208 h4927774_10 pkgs/main
virtualenv 20.28.0 py312haa95532_0 pkgs/main
vs2015_runtime 14.44.35208 ha6b5a95_10 pkgs/main
wcwidth 0.2.14 py312haa95532_0 pkgs/main
wheel 0.46.3 py312haa95532_0 pkgs/main
win_inet_pton 1.1.0 py312haa95532_1 pkgs/main
xraydb 4.5.8 pyhd8ed1ab_0 conda-forge
xz 5.6.4 h4754444_1 pkgs/main
yaml 0.2.5 he774522_0 pkgs/main
zlib 1.3.1 h02ab6af_0 pkgs/main
zstd 1.5.7 h56299aa_0 pkgs/main

the platform is windows 11 and I am working in a micromamba python 3.12 environment.

Note that this is being run after I merged a new diffpy.srreal build in conda-forge so it would be good to ascertain if that is the issue.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions