[vtkusers] VTK 4.0 and Python 2.2

Bob McGhee bmg at pobox.com
Tue Feb 5 08:50:34 EST 2002


i did something like the following
to get VTK 4.0 to work with Python 2.1 
on NT, but with Python
2.2 i got an error message that one of the  
2.1 dll's supplied with VTK was incompatible.

>"Joshua Foster" <joshuaf at vnet.net>
>Date: Tue, 5 Feb 2002 01:02:18 -0500
>
>I have downloaded and installed the VTK 4.0 core binaries 
>and the VTK 4.0 Python libraries and dll's on a Windows 
>XP system.  Now what exactly do I do to get Python 
>to recognize the VTK modules?  

1. copy c:\vtk40\bin\*python*.dll      c:\python21\DLLs

2. copy c:\vtk40\lib\vtk\*python*.lib  c:\python21\libs

3. set PYTHONPATH=c:/vtk40/wrapping/python

>I've tried 'vtk', 'vtkpython', 'vtkCommon' or 'vtkCommonPython'.  
>Does Python have some sort of environment variable?  
>And if so, do I point it to the *.dll's, *.lib's, or *.py's?  

See step 3. above.

>I have also heard about a 'vtkpython.pth' file, but 
>cannot find any information about making it.

In python22\lib\site.py is some info.  You might try:

1. create a file python22\lib\site-packages\vtk.pth 
   This file contains 1 line:
   vtk

2. mkdir c:\python22\lib\site-packages\vtk

3. copy c:\vtk40\Wrapping\Python\vtk\*.*   
to      c:\python22\lib\site-packages\vtk

but i've not gotten VTK to work with Python 2.2 yet
because (i think) one of the dll's in the
current VTK distribution only works with Python 2.1   /b




More information about the vtkusers mailing list