[vtkusers] new to vtk / python - some probs

Dean Inglis dean.inglis at camris.ca
Fri Apr 1 15:35:15 EDT 2011


that was the problem, thanks.  The Release build works fine.
Will post later about vtk/wxpython

Dean


Run "ctest -R Python" in your build tree.  That will allow you to
be sure that it was the install, and not the build, that has caused
the problem.

Use depends.exe or a similar tool to find out what DLL the
vtkCommonPython.pyd module is unable to find.

If you built VTK as Debug but have a python built as Release,
that could be causing problems.  Whenever I need to debug
VTK/Python on Windows, I use RelWithDebInfo instead of
Debug.  (If you want to go full debug mode with python, you
would have to compile your own debug version of python
with the same compiler used with VTK... but personally I
find that to be too much of a hassle).

 - David

> Hi David,
>
> copied all dlls to Python26/Lib/site-packages/vtk
>
> but get
>
> Traceback (most recent call last):
> File "Cone.py", line 13, in <module>
> import vtk
> File "C:\Python26\lib\site-packages\vtk\__init__.py", line 63, in <module>
> __helper.refine_import_err('rendering', 'vtkRenderingPython', exc)
> File "C:\Python26\lib\site-packages\vtk\__helper.py", line 32, in
> refine_impor
> t_err
> raise LinkError, str(exc)
> vtk.__helper.LinkError: DLL load failed: The specified module could not be
> found
> .
>
> same thing happened earlier when I set my path envar to point to the dll's
> in my
> build tree.
>
> Dean
>
>
>
> From the error that was reported, python seems to have located
> vtkCommonPython.pyd but was not able to load vtkCommon.dll.
> The VTK python install assumes that VTK itself has already been
> installed, i.e. that the VTK DLLs are somewhere in the PATH.
> You can copy the DLLsl into site-packages/vtk if you want the
> python install of VTK to be fully self-contained.
>
> Let me know what your experiences are when you try VTK/wxpython.
> I'm not sure if it still works.
>
> - David
>>
>> I am exploring use of python and wxWidgets with VTK.
>> I have downloaded and installed Python 2.6 and wxWidgets 2.83 on Win7
>> with the following installers:
>>
>> python-2.6.4.msi
>> numpy-1.3.0-win32-superpack-python2.6.exe
>> scipy-0.7.1-win32-superpack-python2.6.exe
>> wxPython2.8-win32-ansi-2.8.10.1-py26.exe
>>
>> I have compiled VTK latest git shared build, debug,
>> 32 bit with VS 2010. In my build dir, vtk/Wrapping/Python
>> I ran
>> python setup.py install --prefix=C:\Python26 BUILD_TYPE=Debug
>> swtiched to my source dir
>> VTK/Examples/Tutorial/Step1/Python
>> ran
>> python Cone.py
>> and I get the following
>> Traceback (most recent call last):
>> File "Cone.py", line 13, in <module>
>> import vtk
>> File "C:\Python26\lib\site-packages\vtk\__init__.py", line 41, in 
>> <module>
>> from vtkCommonPython import *
>> ImportError: DLL load failed: The specified module could not be found.
>>
>
> 




More information about the vtkusers mailing list