[vtkusers] using VTK4.0 with Python and Java

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Fri Feb 8 22:08:41 EST 2002


>>>>> "JF" == Joshua Foster <joshuaf at vnet.net> writes:

    JF> Where can I find a compete set of instructions for making VTK
    JF> work with Java and Python on a Windows machine?  I have

[snip]

    JF> Regarding Python: I went in the registry and set my PythonPath
    JF> to include both VTK\Wrapping\Python and VTK\bin.  However,
    JF> neither one of these work as I still cannot import a single
    JF> module/library in Python.  I have seen all kinds of things
    JF> about copying your .dll's to multiple locations, renaming
    JF> vtkpython.py to __init__.py, etc.  Is there anything that will
    JF> actually work?

It would help if you tell us what errors you get when you try
importing vtkpython from python.  There are typically two important
things you need:

  (1) Make python see the VTK python files (like vtkpython.py etc.) 

  (2) Make the system see the right DLL's.

To do (1) you need to maybe copy all the *.py files in the vtkpython
binary that you installed into a 'vtk' directory inside your Python
install (c:\Python21\VTK -- or whatever) and then put a vtk.pth
(c:\Python21\vtk.pth) file that has just the string 'VTK' inside it
(without quotes).

Once that is done everything should work.  Yes, this needs to be
automated.  Lets see if something can't be done.  Problem for me is
that I dont use windows so can't really test out a setup.py.

prabhu



More information about the vtkusers mailing list