Skip to content

Attempt to remove msvcp140.dll vendoring on Windows - #29898

Draft
lesteve wants to merge 2 commits into
scikit-learn:mainfrom
lesteve:remove-msvcp140-dll-vendoring
Draft

lesteve wants to merge 2 commits into
scikit-learn:mainfrom
lesteve:remove-msvcp140-dll-vendoring

Conversation

@lesteve

@lesteve lesteve commented Sep 20, 2024

Copy link
Copy Markdown
Member

Naive attempt following #29789 (comment).

@github-actions

Copy link
Copy Markdown

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: 5d5e69a. Link to the linter CI: here

@lesteve

lesteve commented Sep 20, 2024

Copy link
Copy Markdown
Member Author

Nope that did not work oh well ...

@lesteve lesteve closed this Sep 20, 2024
@lesteve lesteve reopened this Jul 1, 2026
@lesteve
lesteve force-pushed the remove-msvcp140-dll-vendoring branch from 5d5e69a to ea04928 Compare July 1, 2026 04:04
@lesteve

lesteve commented Jul 1, 2026 •

Copy link
Copy Markdown
Member Author

Error is still there when removing msvcp140.dll vendoring build log. The error happens on import when trying to load any compiled module that uses C++, sklearn.preprocessing._target_encoder_fast in this case, but there are others.

 + docker container run -e SKLEARN_SKIP_NETWORK_TESTS=1 --rm scikit-learn/minimal-windows powershell -Command 'pytest --pyargs sklearn'
  ============================= test session starts =============================
  platform win32 -- Python 3.13.14, pytest-9.1.1, pluggy-1.6.0
  rootdir: C:\
  collected 0 items / 1 error
  
  =================================== ERRORS ====================================
  ______________ ERROR collecting Python/Lib/site-packages/sklearn ______________
  Python\Lib\importlib\__init__.py:88: in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  <frozen importlib._bootstrap>:1395: in _gcd_import
      ???
  <frozen importlib._bootstrap>:1360: in _find_and_load
      ???
  <frozen importlib._bootstrap>:1331: in _find_and_load_unlocked
      ???
  <frozen importlib._bootstrap>:935: in _load_unlocked
      ???
  Python\Lib\site-packages\_pytest\assertion\rewrite.py:188: in exec_module
      exec(co, module.__dict__)
  Python\Lib\site-packages\sklearn\conftest.py:20: in <module>
      from sklearn.datasets import (
  Python\Lib\site-packages\sklearn\datasets\__init__.py:8: in <module>
      from sklearn.datasets._base import (
  Python\Lib\site-packages\sklearn\datasets\_base.py:30: in <module>
      from sklearn.preprocessing import scale
  Python\Lib\site-packages\sklearn\preprocessing\__init__.py:36: in <module>
      from sklearn.preprocessing._target_encoder import TargetEncoder
  Python\Lib\site-packages\sklearn\preprocessing\_target_encoder.py:11: in <module>
      from sklearn.preprocessing._target_encoder_fast import (
  E   ImportError: DLL load failed while importing _target_encoder_fast: The specified module could not be found.
  =========================== short test summary info ===========================
  ERROR Python/Lib/site-packages/sklearn - ImportError: DLL load failed while i...
  !!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
  ============================== 1 error in 3.31s ===============================

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

1 participant