Thanks for your instructions. Actually I need to have VTK itself in Python.<div>Let me explain a little more:</div><div><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;background-color:rgb(255,255,255);clear:both;word-wrap:break-word;font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;line-height:18px">
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)</p>
<p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;background-color:rgb(255,255,255);clear:both;word-wrap:break-word;font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;line-height:18px">
Despite they are in same folder when I write down</p><pre class="default prettyprint" style="margin-top:0px;margin-bottom:10px;padding:5px;border:0px;font-size:14px;vertical-align:baseline;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,monospace,serif;overflow:auto;width:auto;max-height:600px;line-height:18px">
<code style="margin:0px;padding:0px;border:0px;font-size:14px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,monospace,serif"><span class="kwd" style="margin:0px;padding:0px;border:0px;font-size:14px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139);background-repeat:initial initial">import</span><span class="pln" style="margin:0px;padding:0px;border:0px;font-size:14px;vertical-align:baseline;background-color:transparent"> vtkCommonPython<br>
</span></code></pre><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;background-color:rgb(255,255,255);clear:both;word-wrap:break-word;font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;line-height:18px">
it is fine, however when I want to import the other one</p><pre class="default prettyprint" style="margin-top:0px;margin-bottom:10px;padding:5px;border:0px;font-size:14px;vertical-align:baseline;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,monospace,serif;overflow:auto;width:auto;max-height:600px;line-height:18px">
<code style="margin:0px;padding:0px;border:0px;font-size:14px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,monospace,serif"><span class="kwd" style="margin:0px;padding:0px;border:0px;font-size:14px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139);background-repeat:initial initial">import</span><span class="pln" style="margin:0px;padding:0px;border:0px;font-size:14px;vertical-align:baseline;background-color:transparent"> vtkFilteringPython<br>
</span><span class="typ" style="margin:0px;padding:0px;border:0px;font-size:14px;vertical-align:baseline;background-color:transparent;color:rgb(43,145,175);background-repeat:initial initial">ImportError</span><span class="pun" style="margin:0px;padding:0px;border:0px;font-size:14px;vertical-align:baseline;background-color:transparent">:</span><span class="pln" style="margin:0px;padding:0px;border:0px;font-size:14px;vertical-align:baseline;background-color:transparent"> DLL load failed</span><span class="pun" style="margin:0px;padding:0px;border:0px;font-size:14px;vertical-align:baseline;background-color:transparent">:</span><span class="pln" style="margin:0px;padding:0px;border:0px;font-size:14px;vertical-align:baseline;background-color:transparent"> </span><span class="typ" style="margin:0px;padding:0px;border:0px;font-size:14px;vertical-align:baseline;background-color:transparent;color:rgb(43,145,175);background-repeat:initial initial">The</span><span class="pln" style="margin:0px;padding:0px;border:0px;font-size:14px;vertical-align:baseline;background-color:transparent"> specified procedure could </span><span class="kwd" style="margin:0px;padding:0px;border:0px;font-size:14px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139);background-repeat:initial initial">not</span><span class="pln" style="margin:0px;padding:0px;border:0px;font-size:14px;vertical-align:baseline;background-color:transparent"> be found</span><span class="pun" style="margin:0px;padding:0px;border:0px;font-size:14px;vertical-align:baseline;background-color:transparent">.</span><span class="pln" style="margin:0px;padding:0px;border:0px;font-size:14px;vertical-align:baseline;background-color:transparent"><br>
</span></code></pre><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;background-color:rgb(255,255,255);clear:both;word-wrap:break-word;font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;line-height:18px">
I tried also to find from where first library is loaded using</p><pre class="default prettyprint" style="margin-top:0px;margin-bottom:10px;padding:5px;border:0px;font-size:14px;vertical-align:baseline;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,monospace,serif;overflow:auto;width:auto;max-height:600px;line-height:18px">
<code style="margin:0px;padding:0px;border:0px;font-size:14px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,monospace,serif"><span class="pln" style="margin:0px;padding:0px;border:0px;font-size:14px;vertical-align:baseline;background-color:transparent">vtkCommonPython</span><span class="pun" style="margin:0px;padding:0px;border:0px;font-size:14px;vertical-align:baseline;background-color:transparent">.</span><span class="pln" style="margin:0px;padding:0px;border:0px;font-size:14px;vertical-align:baseline;background-color:transparent">__file__<br>
</span></code></pre><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;background-color:rgb(255,255,255);clear:both;word-wrap:break-word;font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;line-height:18px">
And it was the same folder&#39;s path for the other one.</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:14px;vertical-align:baseline;background-color:rgb(255,255,255);clear:both;word-wrap:break-word;font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;line-height:18px">
How I can trace the problem and find problem&#39;s source.</p>Thanks</div><div>Hesam<br><div class="gmail_quote">On Tue, Aug 28, 2012 at 9:56 AM, David E DeMarle <span dir="ltr">&lt;<a href="mailto:dave.demarle@kitware.com" target="_blank">dave.demarle@kitware.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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" value="+15188814909">518-881-4909</a><br>
<div><div class="h5"><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;   File &quot;&lt;pyshell#0&gt;&quot;, line 1, in &lt;module&gt;<br>
&gt;<br>
&gt;     import vtk<br>
&gt;<br>
&gt;   File &quot;...\VTK\VTKvisual\Wrapping\Python\vtk\__init__.py&quot;, line 42, in<br>
&gt; &lt;module&gt;<br>
&gt;<br>
&gt;     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;<br>
</div></div>&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;<br>
</blockquote></div><br></div>