[vtkusers] Problem wraping vtk in Python-v2

sylvain.roy at sjgeophysics.com sylvain.roy at sjgeophysics.com
Fri Nov 21 05:38:10 EST 2008


Thanks for the quick reply. The only thing named vtkCommonPython is
a directory (vtkCommonPython.dir) located in
C:\vtk-5.2.0\vtk_binary\Common\CMakeFiles. I checked again in CMake and
all the PYTHON_ENABLE_MODULE were ON including vtkCommonPython. My folder
C:\vtk-5.2.0\VTK_binary\Wrapping\Python contains these files:

.
..
CMakeFiles
cmake_install.cmake
compile_all_vtk.py
compile_all_vtk.pyc
CTestTestfile.cmake
Makefile
PythonInstall.cmake
setup.py
setup.pyc
vtk
vtkPythonAppInitConfigure.h
vtkpythonmodules.h
vtkpythonmodules.h.in
vtk_compile_complete


Regards,
Sylvain


> sylvain.roy at sjgeophysics.com schrieb:
>> I previously wrote:
>>
>> """"""
>> Hello everyone,
>>
>> I installed Python 2.5 and the source code of VTK on a Windows XP today.
>> I
>> followed the directives to wrap vtk in python. I went throught CMake and
>> built the whole thing with mingw32-make.exe -i at the end. Everything
>> seemed fine. The bin folder is full of different files. After doing so,
>> I
>> expected to go in python and type: import vtk, but it didn't work. Is it
>> normal?
>> If not, is there something I did wrong or some advices I could get.
>>
>> Regards,
>> Sylvain
>> """""""""
>>
>> I made some improvement. In site-packages of Python25, I created a file
>> called vtk.pth containing:
>>
>> C:\vtk-5.2.0\VTK_binary\Wrapping\Python
>> C:\vtk-5.2.0\VTK_binary\Wrapping\Python\vtk\tk
>> C:\vtk-5.2.0\VTK_binary\bin\release
>>
>> Now, when I go in Python and write: import vtk, I get:
>>
>> Traceback (most recent call last):
>>   File "<pyshell#0>", line 1, in <module>
>>     import vtk
>>   File "C:/vtk-5.2.0/VTK_binary/Wrapping/Python\vtk\__init__.py", line
>> 41,
>> in <module>
>>     from common import *
>>   File "C:/vtk-5.2.0/VTK_binary/Wrapping/Python\vtk\common.py", line 9,
>> in
>> <module>
>>     from vtkCommonPython import *
>> ImportError: No module named vtkCommonPython
>>
>> Someone has any idea?
>> Sylvain
>>
>>
>
> there was once the problem that files with the wrong file ending were
> produced. Can you check if the missing file has the end .pyd oder .dll
> Try renaming and check the errormessage again.
>
> Regards
> Wolfgang
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>





More information about the vtkusers mailing list