<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7653.38">
<TITLE>RE: [vtkusers] Building VTK on WindowsXp with Python</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Hi Charl,<BR>
<BR>
Your advice was very useful. Renaming the .pyd to not have the lib at the beginning<BR>
helped. But to get it working completely I randomly tried the make install target<BR>
in CodeBlocks and that made a few extra files I needed.<BR>
<BR>
I then had some extra fun in working out how to run my scripts without typing<BR>
&quot;python&quot; script args, and for my arguments to get passed to the script as well!<BR>
<BR>
thanks again,<BR>
Henrik<BR>
<BR>
2009/7/14 Henrik Westerberg &lt;henrik.westerberg@crg.es&gt;:<BR>
&gt; So my problem is I cannot import the libraries into python. I get the<BR>
&gt; common:<BR>
&gt; ImportError: No module name vtkCommonPython<BR>
&gt;<BR>
&gt; I have set both my PYTHONPATH and PATH variables to point at the bin and<BR>
&gt; wrapping directory from VTK and confirmed this with sys.path.<BR>
&gt;<BR>
&gt; So when I had a look in bin and compared it with my linux build I realised<BR>
&gt; the libvtkCommonPython.dll is not<BR>
&gt; present. Is this normal from a correct build? I have libvtkCommonPython.pyd,<BR>
&gt; and libvtkCommonPythonD.dll.<BR>
&gt; In my linux build I have libvtkCommonPython.so. So I am thinking this is the<BR>
&gt; problem.<BR>
<BR>
That's completely normal.&nbsp; Python extension modules on Windows have<BR>
the PYD extension.&nbsp; The vtkCommonPythonD.dll contains the actual<BR>
shared code that's used by the PYD file.<BR>
<BR>
On Windows, the files should be called not libvtkCommonPython, but<BR>
simply vtkCommonPythonD.dll and vtkCommonPython.pyd and so forth (i.e.<BR>
no 'lib' prepended).<BR>
<BR>
Did you also make sure that your PATH is pointing at<BR>
VTK\bin\&lt;BUILD_TARGET&gt; where BUILD_TARGET is something like<BR>
RelWithDebInfo, Debug, or Release?<BR>
<BR>
Your PYTHONPATH seems to be ok, because you're doing &quot;import vtk&quot; (I<BR>
assume) and then it manages to get to vtkCommonPython.<BR>
<BR>
FWIW, I'll soon be making available my VTK 5.4.2 Python 2.6.2 Windows<BR>
binaries at <A HREF="http://cpbotha.net/software/latest-vtk-windows-binaries/">http://cpbotha.net/software/latest-vtk-windows-binaries/</A><BR>
<BR>
<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>