[Insight-users] Python Wrappers - WinXP
Peter M. Bloomfield
peter.bloomfield at camhpet.ca
Wed Oct 31 10:37:25 EDT 2012
Hi,
I am experiencing a problem with python wrapping. I have the following on a 32-bit WinXP machine
Visual Studio 9 2008
ITK V4.2.1
Python 2.7.2
I have selected 'ITK_WRAP_PYTHON' and 'BUILD_SHARED_LIBS' and set 'CMAKE_INSTALL_PREFIX' to C:\CAMH\ITK within cmake, and all
compiles and installs without error in VS 2008.
I have set a PYTHONPATH to include both
C:\CAMH\ITK\lib\ITK-4.2\Python
C:\CAMH\ITK\lib
though I am not sure if I have these correct. I can import itk from within python, but get an error when issuing the command
image_type = itk.Image[itk.F, 3]
as shown below.
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\Peter>python
Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import itk
>>> image_type = itk.Image[itk.F, 3]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\CAMH\ITK\lib\ITK-4.2\Python\itkLazy.py", line 37, in __getattribute__
itkBase.LoadModule(module, namespace)
File "C:\CAMH\ITK\lib\ITK-4.2\Python\itkBase.py", line 95, in LoadModule
LoadModule(dep, namespace)
File "C:\CAMH\ITK\lib\ITK-4.2\Python\itkBase.py", line 95, in LoadModule
LoadModule(dep, namespace)
File "C:\CAMH\ITK\lib\ITK-4.2\Python\itkBase.py", line 95, in LoadModule
LoadModule(dep, namespace)
File "C:\CAMH\ITK\lib\ITK-4.2\Python\itkBase.py", line 95, in LoadModule
LoadModule(dep, namespace)
File "C:\CAMH\ITK\lib\ITK-4.2\Python\itkBase.py", line 103, in LoadModule
if not swigModuleName in sys.modules: module = loader.load(swigModuleName)
File "C:\CAMH\ITK\lib\ITK-4.2\Python\itkBase.py", line 214, in load
return imp.load_module(name, fp, pathname, description)
File "C:\CAMH\ITK\lib\ITK-4.2\Python\ITKCommonPython.py", line 30, in <module>
_ITKCommonPython = swig_import_helper()
File "C:\CAMH\ITK\lib\ITK-4.2\Python\ITKCommonPython.py", line 26, in swig_import_helper
_mod = imp.load_module('_ITKCommonPython', fp, pathname, description)
ImportError: DLL load failed: The specified module could not be found.
>>>
Can anyone point me in the right direction to get the itk python wrapping working,
Many thanks
Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20121031/ef9d8641/attachment.htm>
More information about the Insight-users
mailing list