Skip to content

DLL search path problem - MSVCP140.dll #739

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

Open
1 task done
sp147505 opened this issue Mar 12, 2025 · 12 comments
Open
1 task done

DLL search path problem - MSVCP140.dll #739

sp147505 opened this issue Mar 12, 2025 · 12 comments
Labels
bug Something isn't working windows

Comments

@sp147505
Copy link

Solution to issue cannot be found in the documentation.

  • I checked the documentation.

Issue

I am testing version 24.11.3-1 under Windows 10, but the bug seems to be present at least since 24.5.0-0 and releases in between.

"C:\Miniforge\python.exe" should have a dependency on C:\Miniforge\msvcp140.dll. However I believe that python.exe has been packaged or built incorrectly, as sometimes other DLLs of the same name are loaded up in preference to the correct DLL.

  • As an example, I have a system where McAfee Endpoint Security and McAfee Endpoint Security Threat Prevention are installed.

For some reason, python.exe seems to load functions from C:\Program Files\McAfee\Endpoint Security\Threat Prevention\MSVCP140.dll instead of C:\Miniforge\msvcp140.dll.

  • As the two DLLs are not identical this leads to unpredictable effects and crashes.

For example if I install spyder (along with various other common addons):

mamba install pyarrow python-dateutil pandas numpy scipy ipython -y
mamba install matplotlib jupyterlab notebook spyder ipympl ipywidgets -y

  • Then starting up Spyder causes python.exe to fault, and the kernel within Spyder is unable to start up. Here is the log in Windows Event viewer

Faulting application name: python.exe, version: 3.12.9150.1013, time stamp: 0x67c7812e
Faulting module name: MSVCP140.dll, version: 14.0.24210.0, time stamp: 0x575a4ceb
Exception code: 0xc0000005
Fault offset: 0x0000000000018c34
Faulting process ID: 0x13ac
Faulting application start time: 0x01db9333d5d31b07
Faulting application path: C:\Miniforge\python.exe
Faulting module path: C:\Program Files\McAfee\Endpoint Security\Threat Prevention\MSVCP140.dll
Report ID: 52b62df9-cd54-4d47-8ba5-f383b6769b92
Faulting package full name:
Faulting package-relative application ID:

namely

  • reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options" /v DevOverrideEnable /t REG_DWORD /d 1

  • Reboot the machine.

  • Create a zero-byte "redirection file":
    copy /y nul C:\Miniforge\python.exe.local

but I would prefer not to use this as a permanent change on users' systems, as there could be unforeseen side-effects with other installed software.

I can obviously uninstall the McAfee products on my test system, and Spyder then works, but this is not an option for other machines in our organisation.

  • The last release where this worked correctly without any intervention was 24.3.0-0.

Installed packages

# packages in environment at C:\Miniforge:
#
# Name                    Version                   Build  Channel
_openmp_mutex             4.5                       2_gnu    conda-forge
aiohappyeyeballs          2.5.0              pyhd8ed1ab_0    conda-forge
aiohttp                   3.11.13         py312h31fea79_0    conda-forge
aiosignal                 1.3.2              pyhd8ed1ab_0    conda-forge
alabaster                 1.0.0              pyhd8ed1ab_1    conda-forge
anyio                     4.8.0              pyhd8ed1ab_0    conda-forge
archspec                  0.2.5              pyhd8ed1ab_0    conda-forge
argon2-cffi               23.1.0             pyhd8ed1ab_1    conda-forge
argon2-cffi-bindings      21.2.0          py312h4389bb4_5    conda-forge
arrow                     1.3.0              pyhd8ed1ab_1    conda-forge
astroid                   3.3.9           py312h2e8e312_0    conda-forge
asttokens                 3.0.0              pyhd8ed1ab_1    conda-forge
async-lru                 2.0.4              pyhd8ed1ab_1    conda-forge
asyncssh                  2.20.0             pyhd8ed1ab_0    conda-forge
atomicwrites              1.4.1              pyhd8ed1ab_1    conda-forge
attrs                     25.1.0             pyh71513ae_0    conda-forge
autopep8                  2.0.4              pyhd8ed1ab_0    conda-forge
aws-c-auth                0.8.1                hd11252f_0    conda-forge
aws-c-cal                 0.8.1                h099ea23_3    conda-forge
aws-c-common              0.10.6               h2466b09_0    conda-forge
aws-c-compression         0.3.0                h099ea23_5    conda-forge
aws-c-event-stream        0.5.0               h85d8506_11    conda-forge
aws-c-http                0.9.2                h3888f84_4    conda-forge
aws-c-io                  0.15.3               hc5a9e45_6    conda-forge
aws-c-mqtt                0.11.0              h2c94728_12    conda-forge
aws-c-s3                  0.7.9                h6a47413_1    conda-forge
aws-c-sdkutils            0.2.2                h099ea23_0    conda-forge
aws-checksums             0.2.2                h099ea23_4    conda-forge
aws-crt-cpp               0.29.9               he488853_2    conda-forge
aws-sdk-cpp               1.11.489             h7d73209_0    conda-forge
babel                     2.17.0             pyhd8ed1ab_0    conda-forge
backports                 1.0                pyhd8ed1ab_5    conda-forge
backports.tarfile         1.2.0              pyhd8ed1ab_1    conda-forge
beautifulsoup4            4.13.3             pyha770c72_0    conda-forge
binaryornot               0.4.4              pyhd8ed1ab_2    conda-forge
black                     25.1.0          py312h2e8e312_0    conda-forge
bleach                    6.2.0              pyh29332c3_4    conda-forge
bleach-with-css           6.2.0                h82add2a_4    conda-forge
boltons                   24.0.0             pyhd8ed1ab_1    conda-forge
brotli                    1.1.0                h2466b09_2    conda-forge
brotli-bin                1.1.0                h2466b09_2    conda-forge
brotli-python             1.1.0           py312h275cf98_2    conda-forge
bzip2                     1.0.8                h2466b09_7    conda-forge
c-ares                    1.34.4               h2466b09_0    conda-forge
ca-certificates           2025.1.31            h56e8100_0    conda-forge
cached-property           1.5.2                hd8ed1ab_1    conda-forge
cached_property           1.5.2              pyha770c72_1    conda-forge
cairo                     1.18.4               h5782bbf_0    conda-forge
certifi                   2025.1.31          pyhd8ed1ab_0    conda-forge
cffi                      1.17.1          py312h4389bb4_0    conda-forge
chardet                   5.2.0           py312h2e8e312_2    conda-forge
charset-normalizer        3.4.1              pyhd8ed1ab_0    conda-forge
click                     8.1.8              pyh7428d3b_0    conda-forge
cloudpickle               3.1.1              pyhd8ed1ab_0    conda-forge
colorama                  0.4.6              pyhd8ed1ab_1    conda-forge
comm                      0.2.2              pyhd8ed1ab_1    conda-forge
conda                     24.11.3         py312h2e8e312_0    conda-forge
conda-libmamba-solver     24.9.0             pyhd8ed1ab_0    conda-forge
conda-package-handling    2.4.0              pyh7900ff3_2    conda-forge
conda-package-streaming   0.11.0             pyhd8ed1ab_1    conda-forge
contourpy                 1.3.1           py312hd5eb7cc_0    conda-forge
cookiecutter              2.6.0              pyhd8ed1ab_1    conda-forge
cpython                   3.12.9          py312hd8ed1ab_1    conda-forge
cryptography              44.0.2          py312h9500af3_0    conda-forge
cycler                    0.12.1             pyhd8ed1ab_1    conda-forge
debugpy                   1.8.13          py312h275cf98_0    conda-forge
decorator                 5.2.1              pyhd8ed1ab_0    conda-forge
defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
deprecated                1.2.18             pyhd8ed1ab_0    conda-forge
diff-match-patch          20241021           pyhd8ed1ab_1    conda-forge
dill                      0.3.9              pyhd8ed1ab_1    conda-forge
distro                    1.9.0              pyhd8ed1ab_1    conda-forge
docstring-to-markdown     0.15               pyhd8ed1ab_1    conda-forge
docutils                  0.21.2             pyhd8ed1ab_1    conda-forge
double-conversion         3.3.1                he0c23c2_0    conda-forge
exceptiongroup            1.2.2              pyhd8ed1ab_1    conda-forge
executing                 2.1.0              pyhd8ed1ab_1    conda-forge
flake8                    7.1.2              pyhd8ed1ab_0    conda-forge
fmt                       11.1.4               hf4da5c8_0    conda-forge
font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge
font-ttf-inconsolata      3.000                h77eed37_0    conda-forge
font-ttf-source-code-pro  2.038                h77eed37_0    conda-forge
font-ttf-ubuntu           0.83                 h77eed37_3    conda-forge
fontconfig                2.15.0               h765892d_1    conda-forge
fonts-conda-ecosystem     1                             0    conda-forge
fonts-conda-forge         1                             0    conda-forge
fonttools                 4.56.0          py312h31fea79_0    conda-forge
fqdn                      1.5.1              pyhd8ed1ab_1    conda-forge
freetype                  2.12.1               hdaf720e_2    conda-forge
frozendict                2.4.6           py312h4389bb4_0    conda-forge
frozenlist                1.5.0           py312h31fea79_1    conda-forge
fzf                       0.60.3               h86e1c39_0    conda-forge
glib                      2.82.2               h3d4babf_1    conda-forge
glib-tools                2.82.2               h4394cf3_1    conda-forge
graphite2                 1.3.13            h63175ca_1003    conda-forge
gst-plugins-base          1.24.7               hb0a98b8_0    conda-forge
gstreamer                 1.24.7               h5006eae_0    conda-forge
h11                       0.14.0             pyhd8ed1ab_1    conda-forge
h2                        4.2.0              pyhd8ed1ab_0    conda-forge
harfbuzz                  10.4.0               h9e37d49_0    conda-forge
hpack                     4.1.0              pyhd8ed1ab_0    conda-forge
httpcore                  1.0.7              pyh29332c3_1    conda-forge
httpx                     0.28.1             pyhd8ed1ab_0    conda-forge
hyperframe                6.1.0              pyhd8ed1ab_0    conda-forge
icu                       75.1                 he0c23c2_0    conda-forge
idna                      3.10               pyhd8ed1ab_1    conda-forge
imagesize                 1.4.1              pyhd8ed1ab_0    conda-forge
importlib-metadata        8.6.1              pyha770c72_0    conda-forge
importlib_resources       6.5.2              pyhd8ed1ab_0    conda-forge
inflection                0.5.1              pyhd8ed1ab_1    conda-forge
intel-openmp              2024.2.1          h57928b3_1083    conda-forge
intervaltree              3.1.0              pyhd8ed1ab_1    conda-forge
ipykernel                 6.29.5             pyh4bbf305_0    conda-forge
ipympl                    0.9.6              pyhd8ed1ab_0    conda-forge
ipython                   8.34.0             pyh9ab4c32_0    conda-forge
ipython_genutils          0.2.0              pyhd8ed1ab_2    conda-forge
ipython_pygments_lexers   1.1.1              pyhd8ed1ab_0    conda-forge
ipywidgets                8.1.5              pyhd8ed1ab_1    conda-forge
isoduration               20.11.0            pyhd8ed1ab_1    conda-forge
isort                     6.0.1              pyhd8ed1ab_0    conda-forge
jaraco.classes            3.4.0              pyhd8ed1ab_2    conda-forge
jaraco.context            6.0.1              pyhd8ed1ab_0    conda-forge
jaraco.functools          4.1.0              pyhd8ed1ab_0    conda-forge
jedi                      0.19.2             pyhd8ed1ab_1    conda-forge
jellyfish                 1.1.3           py312h2615798_0    conda-forge
jinja2                    3.1.6              pyhd8ed1ab_0    conda-forge
json5                     0.10.0             pyhd8ed1ab_1    conda-forge
jsonpatch                 1.33               pyhd8ed1ab_1    conda-forge
jsonpointer               3.0.0           py312h2e8e312_1    conda-forge
jsonschema                4.23.0             pyhd8ed1ab_1    conda-forge
jsonschema-specifications 2024.10.1          pyhd8ed1ab_1    conda-forge
jsonschema-with-format-nongpl 4.23.0               hd8ed1ab_1    conda-forge
jupyter-lsp               2.2.5              pyhd8ed1ab_1    conda-forge
jupyter_client            8.6.3              pyhd8ed1ab_1    conda-forge
jupyter_core              5.7.2              pyh5737063_1    conda-forge
jupyter_events            0.12.0             pyh29332c3_0    conda-forge
jupyter_server            2.15.0             pyhd8ed1ab_0    conda-forge
jupyter_server_terminals  0.5.3              pyhd8ed1ab_1    conda-forge
jupyterlab                4.3.5              pyhd8ed1ab_0    conda-forge
jupyterlab_pygments       0.3.0              pyhd8ed1ab_2    conda-forge
jupyterlab_server         2.27.3             pyhd8ed1ab_1    conda-forge
jupyterlab_widgets        3.0.13             pyhd8ed1ab_1    conda-forge
keyring                   25.6.0             pyh7428d3b_0    conda-forge
kiwisolver                1.4.8           py312hc790b64_0    conda-forge
krb5                      1.21.3               hdf4eb48_0    conda-forge
lcms2                     2.17                 hbcf6048_0    conda-forge
lerc                      4.0.0                h63175ca_0    conda-forge
libabseil                 20240722.0      cxx17_h4eb7d71_4    conda-forge
libarchive                3.7.7                h979ed78_3    conda-forge
libarrow                  19.0.1           h8dcb746_0_cpu    conda-forge
libarrow-acero            19.0.1           h7d8d6a5_0_cpu    conda-forge
libarrow-dataset          19.0.1           h7d8d6a5_0_cpu    conda-forge
libarrow-substrait        19.0.1           h3dbecdf_0_cpu    conda-forge
libblas                   3.9.0           31_h641d27c_mkl    conda-forge
libbrotlicommon           1.1.0                h2466b09_2    conda-forge
libbrotlidec              1.1.0                h2466b09_2    conda-forge
libbrotlienc              1.1.0                h2466b09_2    conda-forge
libcblas                  3.9.0           31_h5e41251_mkl    conda-forge
libclang13                19.1.7          default_ha5278ca_1    conda-forge
libcrc32c                 1.1.2                h0e60522_0    conda-forge
libcurl                   8.12.1               h88aaa65_0    conda-forge
libdeflate                1.23                 h9062f6e_0    conda-forge
libevent                  2.1.12               h3671451_1    conda-forge
libexpat                  2.6.4                he0c23c2_0    conda-forge
libffi                    3.4.6                h537db12_0    conda-forge
libgcc                    14.2.0               h1383e82_2    conda-forge
libglib                   2.82.2               h7025463_1    conda-forge
libgomp                   14.2.0               h1383e82_2    conda-forge
libgoogle-cloud           2.35.0               h95c5cb2_0    conda-forge
libgoogle-cloud-storage   2.35.0               he5eb982_0    conda-forge
libgrpc                   1.67.1               h0ac93cb_2    conda-forge
libhwloc                  2.11.2          default_ha69328c_1001    conda-forge
libiconv                  1.18                 h135ad9c_1    conda-forge
libintl                   0.22.5               h5728263_3    conda-forge
libintl-devel             0.22.5               h5728263_3    conda-forge
libjpeg-turbo             3.0.0                hcfcfb64_1    conda-forge
liblapack                 3.9.0           31_h1aa476e_mkl    conda-forge
liblzma                   5.6.4                h2466b09_0    conda-forge
libmamba                  1.5.12               hc493ae7_0    conda-forge
libmambapy                1.5.12          py312h510e527_0    conda-forge
libogg                    1.3.5                h2466b09_0    conda-forge
libparquet                19.0.1           ha850022_0_cpu    conda-forge
libpng                    1.6.47               had7236b_0    conda-forge
libprotobuf               5.28.3               h8309712_1    conda-forge
libre2-11                 2024.07.02           h4eb7d71_2    conda-forge
libsodium                 1.0.20               hc70643c_0    conda-forge
libsolv                   0.7.30               hbb528cf_0    conda-forge
libspatialindex           2.1.0                h518811d_0    conda-forge
libsqlite                 3.49.1               h67fdade_1    conda-forge
libssh2                   1.11.1               he619c9f_0    conda-forge
libthrift                 0.21.0               hbe90ef8_0    conda-forge
libtiff                   4.7.0                h797046b_3    conda-forge
libutf8proc               2.10.0               hf9b99b7_0    conda-forge
libvorbis                 1.3.7                h0e60522_0    conda-forge
libwebp                   1.5.0                h3b0e114_0    conda-forge
libwebp-base              1.5.0                h3b0e114_0    conda-forge
libwinpthread             12.0.0.r4.gg4f2fc60ca      h57928b3_9    conda-forge
libxcb                    1.17.0               h0e4246c_0    conda-forge
libxml2                   2.13.6               he286e8c_0    conda-forge
libxslt                   1.1.39               h3df6e99_0    conda-forge
libzlib                   1.3.1                h2466b09_2    conda-forge
lz4-c                     1.10.0               h2466b09_1    conda-forge
lzo                       2.10              hcfcfb64_1001    conda-forge
mamba                     1.5.12          py312h5494d5c_0    conda-forge
markdown-it-py            3.0.0              pyhd8ed1ab_1    conda-forge
markupsafe                3.0.2           py312h31fea79_1    conda-forge
matplotlib                3.10.1          py312h2e8e312_0    conda-forge
matplotlib-base           3.10.1          py312h90004f6_0    conda-forge
matplotlib-inline         0.1.7              pyhd8ed1ab_1    conda-forge
mccabe                    0.7.0              pyhd8ed1ab_1    conda-forge
mdurl                     0.1.2              pyhd8ed1ab_1    conda-forge
menuinst                  2.2.0           py312h275cf98_0    conda-forge
miniforge_console_shortcut 1.0                  h57928b3_0    conda-forge
mistune                   3.1.2              pyhd8ed1ab_0    conda-forge
mkl                       2024.2.2            h66d3029_15    conda-forge
more-itertools            10.6.0             pyhd8ed1ab_0    conda-forge
multidict                 6.1.0           py312h31fea79_1    conda-forge
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
mypy_extensions           1.0.0              pyha770c72_1    conda-forge
nb_conda_kernels          2.5.1              pyh7428d3b_2    conda-forge
nbclient                  0.10.2             pyhd8ed1ab_0    conda-forge
nbconvert                 7.16.6               hb482800_0    conda-forge
nbconvert-core            7.16.6             pyh29332c3_0    conda-forge
nbconvert-pandoc          7.16.6               hed9df3c_0    conda-forge
nbformat                  5.10.4             pyhd8ed1ab_1    conda-forge
nest-asyncio              1.6.0              pyhd8ed1ab_1    conda-forge
notebook                  7.3.2              pyhd8ed1ab_0    conda-forge
notebook-shim             0.2.4              pyhd8ed1ab_1    conda-forge
numpy                     2.2.3           py312h3150e54_0    conda-forge
numpydoc                  1.8.0              pyhd8ed1ab_1    conda-forge
openjpeg                  2.5.3                h4d64b90_0    conda-forge
openssl                   3.4.1                ha4e3fda_0    conda-forge
orc                       2.0.3                haf104fe_2    conda-forge
overrides                 7.7.0              pyhd8ed1ab_1    conda-forge
packaging                 24.2               pyhd8ed1ab_2    conda-forge
pandas                    2.2.3           py312h72972c8_1    conda-forge
pandoc                    3.6.3                h57928b3_0    conda-forge
pandocfilters             1.5.0              pyhd8ed1ab_0    conda-forge
parso                     0.8.4              pyhd8ed1ab_1    conda-forge
pathspec                  0.12.1             pyhd8ed1ab_1    conda-forge
pcre2                     10.44                h3d7b363_2    conda-forge
pexpect                   4.9.0              pyhd8ed1ab_1    conda-forge
pickleshare               0.7.5           pyhd8ed1ab_1004    conda-forge
pillow                    11.1.0          py312h078707f_0    conda-forge
pip                       25.0.1             pyh8b19718_0    conda-forge
pixman                    0.44.2               had0cd8c_0    conda-forge
pkgutil-resolve-name      1.3.10             pyhd8ed1ab_2    conda-forge
platformdirs              4.3.6              pyhd8ed1ab_1    conda-forge
pluggy                    1.5.0              pyhd8ed1ab_1    conda-forge
ply                       3.11               pyhd8ed1ab_3    conda-forge
prometheus_client         0.21.1             pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.50             pyha770c72_0    conda-forge
propcache                 0.2.1           py312h31fea79_1    conda-forge
psutil                    7.0.0           py312h4389bb4_0    conda-forge
pthread-stubs             0.4               h0e40799_1002    conda-forge
ptyprocess                0.7.0              pyhd8ed1ab_1    conda-forge
pure_eval                 0.2.3              pyhd8ed1ab_1    conda-forge
pyarrow                   19.0.1          py312h2e8e312_0    conda-forge
pyarrow-core              19.0.1          py312h6a9c419_0_cpu    conda-forge
pybind11-abi              4                    hd8ed1ab_3    conda-forge
pycodestyle               2.12.1             pyhd8ed1ab_1    conda-forge
pyconify                  0.2.1              pyhd8ed1ab_0    conda-forge
pycosat                   0.6.6           py312h4389bb4_2    conda-forge
pycparser                 2.22               pyh29332c3_1    conda-forge
pydocstyle                6.3.0              pyhd8ed1ab_1    conda-forge
pyflakes                  3.2.0              pyhd8ed1ab_1    conda-forge
pygithub                  2.6.1              pyhd8ed1ab_0    conda-forge
pygments                  2.19.1             pyhd8ed1ab_0    conda-forge
pyjwt                     2.10.1             pyhd8ed1ab_0    conda-forge
pylint                    3.3.5              pyh29332c3_0    conda-forge
pylint-venv               3.0.4              pyhd8ed1ab_1    conda-forge
pyls-spyder               0.4.0              pyhd8ed1ab_1    conda-forge
pynacl                    1.5.0           py312hdb89ce9_4    conda-forge
pyopenssl                 25.0.0             pyhd8ed1ab_0    conda-forge
pyparsing                 3.2.1              pyhd8ed1ab_0    conda-forge
pyqt                      5.15.9          py312he09f080_5    conda-forge
pyqt5-sip                 12.12.2         py312h53d5487_5    conda-forge
pyqtwebengine             5.15.9          py312hca0710b_5    conda-forge
pyside6                   6.8.2           py312h2ee7485_1    conda-forge
pysocks                   1.7.1              pyh09c184e_7    conda-forge
python                    3.12.9          h3f84c4b_1_cpython    conda-forge
python-dateutil           2.9.0.post0        pyhff2d567_1    conda-forge
python-fastjsonschema     2.21.1             pyhd8ed1ab_0    conda-forge
python-gssapi             1.9.0           py312h2afa726_1    conda-forge
python-json-logger        2.0.7              pyhd8ed1ab_0    conda-forge
python-lsp-black          2.0.0              pyhff2d567_1    conda-forge
python-lsp-jsonrpc        1.1.2              pyhff2d567_1    conda-forge
python-lsp-server         1.12.2             pyhff2d567_0    conda-forge
python-lsp-server-base    1.12.2             pyhd8ed1ab_0    conda-forge
python-slugify            8.0.4              pyhd8ed1ab_1    conda-forge
python-tzdata             2025.1             pyhd8ed1ab_0    conda-forge
python_abi                3.12                    5_cp312    conda-forge
pytoolconfig              1.2.5              pyhd8ed1ab_1    conda-forge
pytz                      2024.1             pyhd8ed1ab_0    conda-forge
pyuca                     1.2                pyhd8ed1ab_2    conda-forge
pywin32                   307             py312h275cf98_3    conda-forge
pywin32-ctypes            0.2.3           py312h2e8e312_1    conda-forge
pywinpty                  2.0.15          py312h275cf98_0    conda-forge
pyyaml                    6.0.2           py312h31fea79_2    conda-forge
pyzmq                     26.2.1          py312hd7027bb_0    conda-forge
qdarkstyle                3.2.3              pyhd8ed1ab_1    conda-forge
qhull                     2020.2               hc790b64_5    conda-forge
qstylizer                 0.2.4              pyhff2d567_0    conda-forge
qt-main                   5.15.15              h9151539_2    conda-forge
qt-webengine              5.15.15              h087ee03_1    conda-forge
qt6-main                  6.8.2                h1259614_0    conda-forge
qtawesome                 1.3.1              pyh9208f05_1    conda-forge
qtconsole                 5.6.1              pyhd8ed1ab_1    conda-forge
qtconsole-base            5.6.1              pyha770c72_1    conda-forge
qtpy                      2.4.3              pyhd8ed1ab_0    conda-forge
re2                       2024.07.02           haf4117d_2    conda-forge
referencing               0.36.2             pyh29332c3_0    conda-forge
reproc                    14.2.5.post0         h2466b09_0    conda-forge
reproc-cpp                14.2.5.post0         he0c23c2_0    conda-forge
requests                  2.32.3             pyhd8ed1ab_1    conda-forge
rfc3339-validator         0.1.4              pyhd8ed1ab_1    conda-forge
rfc3986-validator         0.1.1              pyh9f0ad1d_0    conda-forge
rich                      13.9.4             pyhd8ed1ab_1    conda-forge
roman-numerals-py         3.1.0              pyhd8ed1ab_0    conda-forge
rope                      1.13.0             pyhd8ed1ab_1    conda-forge
rpds-py                   0.23.1          py312hfe1d9c4_0    conda-forge
rtree                     1.4.0              pyh11ca60a_1    conda-forge
ruamel.yaml               0.18.10         py312h4389bb4_0    conda-forge
ruamel.yaml.clib          0.2.8           py312h4389bb4_1    conda-forge
scipy                     1.15.2          py312h451d5c4_0    conda-forge
send2trash                1.8.3              pyh5737063_1    conda-forge
setuptools                75.8.2             pyhff2d567_0    conda-forge
sip                       6.7.12          py312h53d5487_0    conda-forge
six                       1.17.0             pyhd8ed1ab_0    conda-forge
snappy                    1.2.1                h500f7fa_1    conda-forge
sniffio                   1.3.1              pyhd8ed1ab_1    conda-forge
snowballstemmer           2.2.0              pyhd8ed1ab_0    conda-forge
sortedcontainers          2.4.0              pyhd8ed1ab_1    conda-forge
soupsieve                 2.5                pyhd8ed1ab_1    conda-forge
sphinx                    8.2.3              pyhd8ed1ab_0    conda-forge
sphinxcontrib-applehelp   2.0.0              pyhd8ed1ab_1    conda-forge
sphinxcontrib-devhelp     2.0.0              pyhd8ed1ab_1    conda-forge
sphinxcontrib-htmlhelp    2.1.0              pyhd8ed1ab_1    conda-forge
sphinxcontrib-jsmath      1.0.1              pyhd8ed1ab_1    conda-forge
sphinxcontrib-qthelp      2.0.0              pyhd8ed1ab_1    conda-forge
sphinxcontrib-serializinghtml 1.1.10             pyhd8ed1ab_1    conda-forge
spyder                    6.0.4                hd8ed1ab_1    conda-forge
spyder-base               6.0.4           py312h2e8e312_1    conda-forge
spyder-kernels            3.0.3           win_pyh7428d3b_0    conda-forge
stack_data                0.6.3              pyhd8ed1ab_1    conda-forge
superqt                   0.7.0              pyhb6d5dde_0    conda-forge
tabulate                  0.9.0              pyhd8ed1ab_2    conda-forge
tbb                       2021.13.0            h62715c5_1    conda-forge
terminado                 0.18.1             pyh5737063_0    conda-forge
text-unidecode            1.3                pyhd8ed1ab_2    conda-forge
textdistance              4.6.3              pyhd8ed1ab_1    conda-forge
three-merge               0.1.1              pyhd8ed1ab_1    conda-forge
tinycss2                  1.4.0              pyhd8ed1ab_0    conda-forge
tk                        8.6.13               h5226925_1    conda-forge
toml                      0.10.2             pyhd8ed1ab_1    conda-forge
tomli                     2.2.1              pyhd8ed1ab_1    conda-forge
tomlkit                   0.13.2             pyha770c72_1    conda-forge
tornado                   6.4.2           py312h4389bb4_0    conda-forge
tqdm                      4.67.1             pyhd8ed1ab_1    conda-forge
traitlets                 5.14.3             pyhd8ed1ab_1    conda-forge
truststore                0.10.1             pyh29332c3_0    conda-forge
types-python-dateutil     2.9.0.20241206     pyhd8ed1ab_0    conda-forge
typing-extensions         4.12.2               hd8ed1ab_1    conda-forge
typing_extensions         4.12.2             pyha770c72_1    conda-forge
typing_utils              0.1.0              pyhd8ed1ab_1    conda-forge
tzdata                    2025a                h78e105d_0    conda-forge
ucrt                      10.0.22621.0         h57928b3_1    conda-forge
ujson                     5.10.0          py312h275cf98_1    conda-forge
unicodedata2              16.0.0          py312h4389bb4_0    conda-forge
uri-template              1.3.0              pyhd8ed1ab_1    conda-forge
urllib3                   2.3.0              pyhd8ed1ab_0    conda-forge
vc                        14.3                hbf610ac_24    conda-forge
vc14_runtime              14.42.34438         hfd919c2_24    conda-forge
vs2015_runtime            14.42.34438         h7142326_24    conda-forge
watchdog                  6.0.0           py312h2e8e312_0    conda-forge
wcwidth                   0.2.13             pyhd8ed1ab_1    conda-forge
webcolors                 24.11.1            pyhd8ed1ab_0    conda-forge
webencodings              0.5.1              pyhd8ed1ab_3    conda-forge
websocket-client          1.8.0              pyhd8ed1ab_1    conda-forge
whatthepatch              1.0.7              pyhd8ed1ab_1    conda-forge
wheel                     0.45.1             pyhd8ed1ab_1    conda-forge
widgetsnbextension        4.0.13             pyhd8ed1ab_1    conda-forge
win_inet_pton             1.1.0              pyh7428d3b_8    conda-forge
winpty                    0.4.3                         4    conda-forge
wrapt                     1.17.2          py312h4389bb4_0    conda-forge
xorg-libxau               1.0.12               h0e40799_0    conda-forge
xorg-libxdmcp             1.1.5                h0e40799_0    conda-forge
yaml                      0.2.5                h8ffe710_2    conda-forge
yaml-cpp                  0.8.0                h63175ca_0    conda-forge
yapf                      0.43.0             pyhd8ed1ab_1    conda-forge
yarl                      1.18.3          py312h31fea79_1    conda-forge
zeromq                    4.3.5                ha9f60a1_7    conda-forge
zipp                      3.21.0             pyhd8ed1ab_1    conda-forge
zstandard                 0.23.0          py312h7606c53_1    conda-forge
zstd                      1.5.6                h0ea2cb4_0    conda-forge

Environment info

active environment : base
    active env location : C:\Miniforge
            shell level : 1
       user config file : C:\Users\eeeadmin6\.condarc
 populated config files : C:\Miniforge\.condarc
          conda version : 24.11.3
    conda-build version : not installed
         python version : 3.12.9.final.0
                 solver : libmamba (default)
       virtual packages : __archspec=1=skylake
                          __conda=24.11.3=0
                          __win=0=0
       base environment : C:\Miniforge  (writable)
      conda av data dir : C:\Miniforge\etc\conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/win-64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : C:\Miniforge\pkgs
                          C:\Users\eeeadmin6\.conda\pkgs
                          C:\Users\eeeadmin6\AppData\Local\conda\conda\pkgs
       envs directories : C:\Miniforge\envs
                          C:\Users\eeeadmin6\.conda\envs
                          C:\Users\eeeadmin6\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/24.11.3 requests/2.32.3 CPython/3.12.9 Windows/10 Windows/10.0.19045 solver/libmamba conda-libmamba-solver/24.9.0 libmambapy/1.5.12
          administrator : True
             netrc file : None
           offline mode : False
@sp147505 sp147505 added the bug Something isn't working label Mar 12, 2025
@hmaarrfk
Copy link
Contributor

@jjerphan @SylvainCorlay is this likely the fmt 11 bug?

@SylvainCorlay
Copy link
Member

At least, that's something that's clearly wrong in this env.

@SylvainCorlay
Copy link
Member

Ping @Klaim, in case you have an idea.

@hmaarrfk
Copy link
Contributor

@sp147505 for context, we just released https://github.com/conda-forge/miniforge/releases/tag/24.11.3-2 which addresses a known issue with fmt 11.1.4 that was present in the 24.11.3-1 installer.

It would be helpful to us if you would "reinstall" with 24.11.3-2 and report your findings.

@Klaim
Copy link

Klaim commented Mar 13, 2025

I'm not super familiar with how miniforge works so bear with me.

What is the path of the working directory when the python command (following the example) is executed? Also could you gather the content of the PATH environment variable from that context?

Usually this kind of thing happens when the environment is setup in a way where Windows cannot find the dependency locally (in the working directory or in the directory of the exe) and will start going through the PATH directories, in which case it will stop at the first matching name, if my memory is correct. If the directory providing the dlls you expect are not in the PATH or if they are but after another directory providing a version of that dll, that might be it.

If that's not it, then there are other ways dependencies binaries are selected first which could play a role but I lack info on the context to help figure that out.

Note that it wouldnt be surprising if MSVCP140.dll is a special name dll and mcaffee setups the system to force-use it's one to help with some security stuffs. Special names dlls are used in priority over looking in directories.
I use window's defender so I have no idea how mcaffee works.

As the two DLLs are not identical this leads to unpredictable effects and crashes.

Note that they should have the same ABI, it's versioned through the name and is supposed to be stable. If it's not, to me that super suspicious.

@SylvainCorlay
Copy link
Member

@sp147505 would you be able to try out with the more recent builds of miniforge?

@sp147505
Copy link
Author

@hmaarrfk @SylvainCorlay I tried 24.11.3-2 but unfortunately it still has the same problem. Furthermore I noticed that 25.1.1-2 (prerelease) was available but that has the same problem too, sorry.

@Klaim At present my CWD for all tests is C:. Happy to try other suggestions.

Here's my PATH when once I've started the Miniforge command prompt:

PATH=C:\Miniforge;C:\Miniforge\Library\mingw-w64\bin;C:\Miniforge\Library\usr\bin;C:\Miniforge\Library\bin;C:\Miniforge\Scripts;C:\Miniforge\bin;C:\Miniforge\condabin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Users\XXXXXX\AppData\Local\Microsoft\WindowsApps;

As an additional step, I also prepended "C:\Miniforge" to the system PATH variable, so that the "correct" MSVCP140.DLL would be sure to be picked up during any scan of the path. But that didn't work either unfortunately.

Re your other thoughts - I agree with you that the issue is likely something to do with the list in the link you posted. Happy to try other things to do with that list if someone can explain what to do. Only a few of the options make sense to me.

The mystery for me is that all Miniforge releases up to and including 24.3.0-0 work fine, on exactly the same system / McAfee version, policies etc. So what was the installer (or Python.exe) doing correctly in 24.3.0-0, and later releases not so?

I haven't come across any previous situation in many years of supporting Windows applications, where McAfee needed to be uninstalled in order to resolve an apparent DLL naming clash with another application.

Thanks all for your comments, very helpful

@hmaarrfk
Copy link
Contributor

Are you in a position where you can try to uninstall McAcfee to help troubleshoot?

@sp147505
Copy link
Author

Yes, but to get rid of all McAfee components completely, the easiest route will be to rebuild my test machine after putting in an exclusion for McAfee from deploying in the first place.

I'll give it a go... (and hoping there isn't some other policy somewhere putting it back on)

@Harrier-Du-Bois
Copy link

Harrier-Du-Bois commented Mar 18, 2025

Fwiw, I'm having the exact same issue, but I'm not using conda or miniforge or fmt.

What's causing this on my end is using mysql-connector-python > 9.0.0.
Apparently it has a VC dependency and the latest connector (9.2) requires the latest redist to work.
So I had that installed by my organisation but the crash still happens because for some reason python (3.12.4 on my end) picks the MSVCP140.DLL from McAfee\Endpoint Security\Threat Prevention a.k.a. Trellix instead of the one installed as part of the VC redist package.

I'm not desperately dependent on v9.2 of the connector and with 9.0.0 it doesn't crash, most likely because that was built with the old VC version which that old MSVCP140.DLL in Trellix is from, but I'd still like to find a way for python to use the actual VC redist package components and not some outdated ones shipped with the AV.
Due to rights restrictions, I cannot alter system PATH, just the local one.

Any suggestions welcome.

@sp147505
Copy link
Author

@hmaarrfk I've built a machine without McAfee on it, installed Miniforge 24.11.3-2 and repeated my previous tests. Spyder works perfectly now, with the DLL being picked up from the correct location of C:\Miniforge\MSVCP140.dll.

@Harrier-Du-Bois Your problem is interesting, as it suggests the problem could be deeper within Python.

I have just tried Python 3.13.2 from python.org. Although Spyder doesn't crash (as it did with Miniforge), DLL explorer shows that this is still loading MSVCP140.DLL from the McAfee installation directory, rather than the correct one within its installation tree.

I will be trying older versions of CPython to see if there is any correlation with Miniforge in terms of which versions work correctly, and which versions don't, on systems with McAfee installed.

Thanks all!

@sp147505
Copy link
Author

sp147505 commented Apr 9, 2025

Dear all,

Thanks for your comments so far. After some further investigations, we have established that the problem is caused by McAfee Threat Prevention interfering with python.exe.

Specifically, it is the "Antimalware Scan Interface" - details at

https://www.mcafee.com/blogs/other-blogs/mcafee-labs/mcafee-amsi-integration-protects-against-malicious-scripts/

Switching this off makes the problem go away.

Although this setting can be disabled using a central McAfee policy, one issue we have is that it can probably only enabled or disabled on a whole-machine basis. There may not be away of restricting this setting to the C:\Miniforge tree or the python.exe executable. I am having a conversation with our enterprise sysadmins.

Separately, on systems with the McAfee policy enabled, I can initiate a program crash with fewer steps than I've outlined in previous posts. All I need to do get python.exe to crash is the following:

  • Install any recent Miniforge for Windows (e.g. 24.11.3-2)

Then:

  • mamba install ipython pandas pyarrow -y
  • ipython.exe

import pandas as pd
(crashes if McAfee Endpoint Security is running with the above policy)

The crash only occurs if vc14_runtime is greater than 14.38 (or conversely, pinning vc14_runtime at 14.38 will
prevent the problem from occurring).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working windows
Development

No branches or pull requests

6 participants