I am trying to install GDCM on Windows (10, x64) so I can use the GDCM package with Python 3.6.5, and am finding it completely impossible.
I have tried every combination of:
The best I can get is copying the above mentioned files to site-packages, which allows python to detect the gdcm package (when the files are removed from site-packages it detects nothing), but returns the error:
>>> import gdcm
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Program Files\Python36\lib\site-packages\gdcm.py", line 68, in
<module>
from gdcmswig import *
File "C:\Program Files\Python36\lib\site-packages\gdcmswig.py", line 20, in
<module>
_gdcmswig = swig_import_helper()
File "C:\Program Files\Python36\lib\site-packages\gdcmswig.py", line 19, in
swig_import_helper
return importlib.import_module(mname)
File "C:\Program Files\Python36\lib\importlib\__init__.py", line 126, in
import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: DLL load failed: The specified module could not be found.
Installing the _x86 version instead returns the error "%1 is not a Valid Win32 application".
I downloaded dependencyWalker to analyse _gdcmswig.pyd, but from this I cannot understand much. The problem is not MSVCP100.dll, as I have vc_redist_x64 installed. It does mention Python34.dll, but the answer below got the exact same installer working on Python 3.6.
The solution mentioned at: how to install gdcm python wrapping on Windows System? does not work for me.
Lastly, I cannot get python to detect the package from the Program Files/GDCM 2.8/bin, regardless of what is in PATH, PYTHONPATH, or PYTHONHOME; I don't know if this is normal or not.
I have spent hours on this, to no avail; any help is greatly appreciated.
For posterity:
For me, it seems the issue was indeed that the official provided binaries were compiled for Python 3.4; I have no idea how this person got the same installer working on Python 3.6.
The solution was to build the package binaries myself; there was no "one-click" solution. For my ridiculously convoluted adventure in troubleshooting this problem, see: https://motivatedbylaziness.wordpress.com/2018/07/06/the-impossible-journey-of-a-simple-task/