<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
code
        {mso-style-priority:99;
        font-family:"Courier New";}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert Zchn";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLVorformatiertZchn
        {mso-style-name:"HTML Vorformatiert Zchn";
        mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert";
        font-family:Consolas;
        mso-fareast-language:DE;}
span.kwd
        {mso-style-name:kwd;}
span.pln
        {mso-style-name:pln;}
span.typ
        {mso-style-name:typ;}
span.pun
        {mso-style-name:pun;}
span.E-MailFormatvorlage25
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=DE link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hello Hesam,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>usually if you import vtk this imports BOTH vtkCommonPython and vtkFilteringPython.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I don&#8217;t know why you want to include them separately?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>The problem with vtkFilteringPython when you try to include it on it&#8217;s own sounds to me like there is no __init_ for it?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>That would mean it is not supposed to be imported that way. (If you want to include it separately you could try: from vtkFilteringPython import *)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>If you are in doubt as to what happens when you do &#8216;import vtk&#8217; take a look at the __init__.py. <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Anyhow&#8230; whatever you are trying to do: I think both David&#8217;s and my solution would solve your problem.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Could you just give it a try and if anything is not working for you, describe to us what you want to do?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Cheers,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Kirstin<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Von:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Hesam [mailto:hesam.ilati2@gmail.com] <br><b>Gesendet:</b> Dienstag, 28. August 2012 20:21<br><b>An:</b> David E DeMarle<br><b>Cc:</b> Heidler, Kirstin (GE Oil &amp; Gas); vtkusers@vtk.org<br><b>Betreff:</b> Re: [vtkusers] Trying to use VTK library in Python Interpreter<o:p></o:p></span></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Thanks for your instructions. Actually I need to have VTK itself in Python.<o:p></o:p></p><div><p class=MsoNormal>Let me explain a little more:<o:p></o:p></p></div><div><p style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;line-height:13.5pt;background:white;vertical-align:baseline;word-wrap:break-word'><span style='font-size:10.5pt;font-family:"Arial","sans-serif"'>Consier I have 2 external vtk libraries in the same folder and I want to import them into the Python. (i.e. &quot;vtkCommonPython&quot; and &quot;vtkFilteringPython&quot;) and both of them have .pyd and .dll files. (vtkCommonPython.pyd and vtkCommonPythonD.dll and same for other one)<o:p></o:p></span></p><p style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;line-height:13.5pt;background:white;vertical-align:baseline;word-wrap:break-word'><span style='font-size:10.5pt;font-family:"Arial","sans-serif"'>Despite they are in same folder when I write down<o:p></o:p></span></p><pre style='margin-bottom:7.5pt;line-height:13.5pt;background:#EEEEEE;vertical-align:baseline;max-height:600px;overflow:auto'><span style='font-size:10.5pt;font-family:Consolas'><o:p>&nbsp;</o:p></span></pre><pre style='line-height:13.5pt;background:#EEEEEE;vertical-align:baseline'><span class=kwd><span style='font-size:10.5pt;font-family:Consolas;color:darkblue;border:none windowtext 1.0pt;padding:0cm'>import</span></span><span class=pln><span style='font-size:10.5pt;font-family:Consolas;border:none windowtext 1.0pt;padding:0cm'> vtkCommonPython</span></span><span style='font-size:10.5pt;font-family:Consolas;border:none windowtext 1.0pt;padding:0cm'><br><br><span class=pln><o:p></o:p></span></span></pre><p style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;line-height:13.5pt;background:white;vertical-align:baseline;word-wrap:break-word'><span style='font-size:10.5pt;font-family:"Arial","sans-serif"'>it is fine, however when I want to import the other one<o:p></o:p></span></p><pre style='margin-bottom:7.5pt;line-height:13.5pt;background:#EEEEEE;vertical-align:baseline;max-height:600px;overflow:auto'><span style='font-size:10.5pt;font-family:Consolas'><o:p>&nbsp;</o:p></span></pre><pre style='line-height:13.5pt;background:#EEEEEE;vertical-align:baseline'><span class=kwd><span style='font-size:10.5pt;font-family:Consolas;color:darkblue;border:none windowtext 1.0pt;padding:0cm'>import</span></span><span class=pln><span style='font-size:10.5pt;font-family:Consolas;border:none windowtext 1.0pt;padding:0cm'> vtkFilteringPython</span></span><span style='font-size:10.5pt;font-family:Consolas;border:none windowtext 1.0pt;padding:0cm'><br><br><span class=pln><o:p></o:p></span></span></pre><pre style='line-height:13.5pt;background:#EEEEEE;vertical-align:baseline'><span class=typ><span style='font-size:10.5pt;font-family:Consolas;color:#2B91AF;border:none windowtext 1.0pt;padding:0cm'>ImportError</span></span><span class=pun><span style='font-size:10.5pt;font-family:Consolas;border:none windowtext 1.0pt;padding:0cm'>:</span></span><span class=pln><span style='font-size:10.5pt;font-family:Consolas;border:none windowtext 1.0pt;padding:0cm'> DLL load failed</span></span><span class=pun><span style='font-size:10.5pt;font-family:Consolas;border:none windowtext 1.0pt;padding:0cm'>:</span></span><span class=pln><span style='font-size:10.5pt;font-family:Consolas;border:none windowtext 1.0pt;padding:0cm'> </span></span><span class=typ><span style='font-size:10.5pt;font-family:Consolas;color:#2B91AF;border:none windowtext 1.0pt;padding:0cm'>The</span></span><span class=pln><span style='font-size:10.5pt;font-family:Consolas;border:none windowtext 1.0pt;padding:0cm'> specified procedure could </span></span><span class=kwd><span style='font-size:10.5pt;font-family:Consolas;color:darkblue;border:none windowtext 1.0pt;padding:0cm'>not</span></span><span class=pln><span style='font-size:10.5pt;font-family:Consolas;border:none windowtext 1.0pt;padding:0cm'> be found</span></span><span class=pun><span style='font-size:10.5pt;font-family:Consolas;border:none windowtext 1.0pt;padding:0cm'>.</span></span><span style='font-size:10.5pt;font-family:Consolas;border:none windowtext 1.0pt;padding:0cm'><br><br><span class=pln><o:p></o:p></span></span></pre><p style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;line-height:13.5pt;background:white;vertical-align:baseline;word-wrap:break-word'><span style='font-size:10.5pt;font-family:"Arial","sans-serif"'>I tried also to find from where first library is loaded using<o:p></o:p></span></p><pre style='margin-bottom:7.5pt;line-height:13.5pt;background:#EEEEEE;vertical-align:baseline;max-height:600px;overflow:auto'><span style='font-size:10.5pt;font-family:Consolas'><o:p>&nbsp;</o:p></span></pre><pre style='line-height:13.5pt;background:#EEEEEE;vertical-align:baseline'><span class=pln><span style='font-size:10.5pt;font-family:Consolas;border:none windowtext 1.0pt;padding:0cm'>vtkCommonPython</span></span><span class=pun><span style='font-size:10.5pt;font-family:Consolas;border:none windowtext 1.0pt;padding:0cm'>.</span></span><span class=pln><span style='font-size:10.5pt;font-family:Consolas;border:none windowtext 1.0pt;padding:0cm'>__file__</span></span><span style='font-size:10.5pt;font-family:Consolas;border:none windowtext 1.0pt;padding:0cm'><br><br><span class=pln><o:p></o:p></span></span></pre><p style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;line-height:13.5pt;background:white;vertical-align:baseline;word-wrap:break-word'><span style='font-size:10.5pt;font-family:"Arial","sans-serif"'>And it was the same folder's path for the other one.<o:p></o:p></span></p><p style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;line-height:13.5pt;background:white;vertical-align:baseline;word-wrap:break-word'><span style='font-size:10.5pt;font-family:"Arial","sans-serif"'>How I can trace the problem and find problem's source.<o:p></o:p></span></p><p class=MsoNormal>Thanks<o:p></o:p></p></div><div><p class=MsoNormal>Hesam<o:p></o:p></p><div><p class=MsoNormal>On Tue, Aug 28, 2012 at 9:56 AM, David E DeMarle &lt;<a href="mailto:dave.demarle@kitware.com" target="_blank">dave.demarle@kitware.com</a>&gt; wrote:<o:p></o:p></p><p class=MsoNormal>Another solution is to make sure you have all of the required vtk<br>libraries and python modules in your PATH and PYTHONPATH respectively.<br>(Or ld_library_path if not windows.)<br><br>pythonpath should contain both vtkbld/bin and<br>vtkbld/vtkPythonWrapping, and path should have vtkbld/bin .<br><br>See <a href="http://paraview.org/Wiki/ParaView/Python_Scripting" target="_blank">http://paraview.org/Wiki/ParaView/Python_Scripting</a> getting started<br>for more details.<br><br>David E DeMarle<br>Kitware, Inc.<br>R&amp;D Engineer<br>21 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: <a href="tel:518-881-4909">518-881-4909</a><o:p></o:p></p><div><div><p class=MsoNormal><br><br>On Tue, Aug 28, 2012 at 3:39 AM, Heidler, Kirstin (GE Oil &amp; Gas)<br>&lt;<a href="mailto:Kirstin.Heidler@ge.com">Kirstin.Heidler@ge.com</a>&gt; wrote:<br>&gt; Hello Hesam,<br>&gt;<br>&gt;<br>&gt;<br>&gt; I had some troubles installing VTK for python. Somehow the libraries were<br>&gt; not properly linked.<br>&gt;<br>&gt; I did not solve that error, but I found a different solution which works<br>&gt; very well.<br>&gt;<br>&gt;<br>&gt;<br>&gt; <a href="http://www.lfd.uci.edu/~gohlke/pythonlibs/" target="_blank">http://www.lfd.uci.edu/~gohlke/pythonlibs/</a><br>&gt;<br>&gt;<br>&gt;<br>&gt; On this page you can find an executable which installs VTK for python. (just<br>&gt; search for vtk on the page)<br>&gt;<br>&gt;<br>&gt;<br>&gt; Afterwards, when you try to import vtk, it fails the first time, but works<br>&gt; the second time and any afterward. (Not sure why that happens I suppose it<br>&gt; has something to do with unbuilt binaries)<br>&gt;<br>&gt;<br>&gt;<br>&gt; Cheers,<br>&gt;<br>&gt; Kirstin<br>&gt;<br>&gt;<br>&gt;<br>&gt; Von: <a href="mailto:vtkusers-bounces@vtk.org">vtkusers-bounces@vtk.org</a> [mailto:<a href="mailto:vtkusers-bounces@vtk.org">vtkusers-bounces@vtk.org</a>] Im Auftrag<br>&gt; von Hesam<br>&gt; Gesendet: Montag, 27. August 2012 19:39<br>&gt; An: <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>&gt; Betreff: [vtkusers] Trying to use VTK library in Python Interpreter<br>&gt;<br>&gt;<br>&gt;<br>&gt; Hi all,<br>&gt;<br>&gt; Goal: Trying to use VTK library in Python Interpreter.<br>&gt;<br>&gt; What I did: I have installed VTK using CMake with option VTK_WRAP_PYTHON and<br>&gt; Shared_Library enabled and build the VTK in visual studio and it has<br>&gt; finished with all builds successfully. Then I made the Python_Path.<br>&gt;<br>&gt; Problem: When I try to import vtk library into python, I get the following<br>&gt; error message:<br>&gt;<br>&gt;<br>&gt;<br>&gt;&gt;&gt;&gt; import vtk<br>&gt;<br>&gt;<br>&gt; Traceback (most recent call last):<br>&gt;<br>&gt; &nbsp; File &quot;&lt;pyshell#0&gt;&quot;, line 1, in &lt;module&gt;<br>&gt;<br>&gt; &nbsp; &nbsp; import vtk<br>&gt;<br>&gt; &nbsp; File &quot;...\VTK\VTKvisual\Wrapping\Python\vtk\__init__.py&quot;, line 42, in<br>&gt; &lt;module&gt;<br>&gt;<br>&gt; &nbsp; &nbsp; from vtkFilteringPython import *<br>&gt;<br>&gt; ImportError: No module named vtkFilteringPython<br>&gt;<br>&gt; Any thoughts that why this is happening?<br>&gt;<br>&gt; Thanks<br>&gt;<br>&gt;<o:p></o:p></p></div></div><p class=MsoNormal>&gt; _______________________________________________<br>&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>&gt;<br>&gt; Visit other Kitware open-source projects at<br>&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>&gt;<br>&gt; Please keep messages on-topic and check the VTK FAQ at:<br>&gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>&gt;<br>&gt; Follow this link to subscribe/unsubscribe:<br>&gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>&gt;<o:p></o:p></p></div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div></div></body></html>