Ok.. I just got VTK & Python working together on my Windows & our IRIX system, but I had alot of issues.. Just want to ask here to see if anyone has any ideas or better solutions.<br><br><span style="font-weight: bold;">
On Windows:</span><br>I compiled VTK's latest CVS and used the Downloaded Binaries of Python 2.4.3 from <a href="http://www.python.org">www.python.org</a>.<br>1) To get around a persistent "Unknown CMake Command VTK_GET_TCL_TK_VERSION" error when I enabled VTK_WRAP_PYTHON, I had to disable VTK_USE_TK.
<br>2) Once compilation was complete & installation ran, I was unable to import the vtk package because various dll's were missing. I finally had to copy libvtk*PythonD.dll to vtk*Python.dll and now it works. the libvtk* versions are required for the inter-library links, but python wants just the vtk* versions.
<br><br><span style="font-weight: bold;">On IRIX. </span><span style="font-style: italic;">(On Irix, I wanted to compile everything 64-bit for the large memory/data support)</span><br>Using latest VTK CVS (as of this morning) and python
2.4.3 compiled from source by me.<br>1) To get Python to compile 64-bit, I not only had to set CFLAGS, CPPFLAGS, and LDFLAGS to "-64 -mips4", but after I ran configure I had to manually edit the Makefile and add "-64 -mips4" to the BASECFLAGS line.
<br>2) Once Python was installed, I had to manually edit the Python.h file to remove (I actually #if 0'd it) the references to time.h since there is a collision between the declaration of "select" in unistd.h and sys/time.h that oddly enough lets Python compile but not VTK's Wrappings.
<br>3) I had to again disable VTK_USE_TK. Not because of the same GET_TCL_TK_VERSION error, but because the Widgets kept looking for TclPkgVersion commands and I wasn't using TCL Wrappings.<br>4) Finally, during the compile of Wrapping/Python/vtkPythonAppInit the compile would fail because the
libpython2.4.a wanted pthreads. Enabling PTHREADs in cmake caused other problems, so I finally hand-compiling that one file (gmake VERBOSE=1 to get the command) and added the "-lpthread" .<br><br>For VTK, I used my "usual" compile parameters for 64-bit, Mangled-Mesa, & Shared libs.
<br><br clear="all"><br>-- <br>----------------------------------------<br>Randall Hand<br>Visualization Scientist<br>ERDC MSRC-ITL