Commit 54bea15
committed
windows: Add Visual Studio runtime libraries to itk-core
This addresses the error:
import _ITKPyBasePython
ImportError: DLL load failed:
On Windows when: Visual Studio is not installed on the system, or the
vc_redist.x64.exe Visual Studio C++ redistributables are not installed,
or Anaconda is not used (Anaconda ships the redistributable dll's in a
vc2015_runtime package when Python is installed).
With DependencyWalker, we can observe that the _ITKPyBasePython.pyd dll
requires vcruntime140.dll, vcruntime140_1.dll, and msvcp140.dll. CPython
from python.org ships with vcruntime140.dll for Python 3.5, 3.6, 3.7, and
3.8. Experimentally, if we add msvcp140.dll to the itk/ package
directory, the import succeeds. This patch adds all three libraries plus
an additional library with the CMake InstallRequiredSystemLibraries
module to the itk-core package.
For more information, see this blog post by Steve Dower:
https://stevedower.id.au/blog/building-for-python-3-5-part-two
Thanks to Jean-Christophe Fillion-Robin for the helpful discussion.1 parent 1e865ce commit 54bea15
1 file changed
+9
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
488 | 488 | | |
489 | 489 | | |
490 | 490 | | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
491 | 499 | | |
492 | 500 | | |
493 | 501 | | |
| |||
0 commit comments