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,'Liberation Sans','DejaVu Sans',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. "vtkCommonPython" and "vtkFilteringPython") 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,'Liberation Sans','DejaVu Sans',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,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',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,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',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,'Liberation Sans','DejaVu Sans',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,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',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,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',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,'Liberation Sans','DejaVu Sans',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,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',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,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',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,'Liberation Sans','DejaVu Sans',sans-serif;line-height:18px">
And it was the same folder'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,'Liberation Sans','DejaVu Sans',sans-serif;line-height:18px">
How I can trace the problem and find problem'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"><<a href="mailto:dave.demarle@kitware.com" target="_blank">dave.demarle@kitware.com</a>></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&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 & Gas)<br>
<<a href="mailto:Kirstin.Heidler@ge.com">Kirstin.Heidler@ge.com</a>> wrote:<br>
> Hello Hesam,<br>
><br>
><br>
><br>
> I had some troubles installing VTK for python. Somehow the libraries were<br>
> not properly linked.<br>
><br>
> I did not solve that error, but I found a different solution which works<br>
> very well.<br>
><br>
><br>
><br>
> <a href="http://www.lfd.uci.edu/~gohlke/pythonlibs/" target="_blank">http://www.lfd.uci.edu/~gohlke/pythonlibs/</a><br>
><br>
><br>
><br>
> On this page you can find an executable which installs VTK for python. (just<br>
> search for vtk on the page)<br>
><br>
><br>
><br>
> Afterwards, when you try to import vtk, it fails the first time, but works<br>
> the second time and any afterward. (Not sure why that happens I suppose it<br>
> has something to do with unbuilt binaries)<br>
><br>
><br>
><br>
> Cheers,<br>
><br>
> Kirstin<br>
><br>
><br>
><br>
> 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>
> von Hesam<br>
> Gesendet: Montag, 27. August 2012 19:39<br>
> An: <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>
> Betreff: [vtkusers] Trying to use VTK library in Python Interpreter<br>
><br>
><br>
><br>
> Hi all,<br>
><br>
> Goal: Trying to use VTK library in Python Interpreter.<br>
><br>
> What I did: I have installed VTK using CMake with option VTK_WRAP_PYTHON and<br>
> Shared_Library enabled and build the VTK in visual studio and it has<br>
> finished with all builds successfully. Then I made the Python_Path.<br>
><br>
> Problem: When I try to import vtk library into python, I get the following<br>
> error message:<br>
><br>
><br>
><br>
>>>> import vtk<br>
><br>
><br>
> Traceback (most recent call last):<br>
><br>
> File "<pyshell#0>", line 1, in <module><br>
><br>
> import vtk<br>
><br>
> File "...\VTK\VTKvisual\Wrapping\Python\vtk\__init__.py", line 42, in<br>
> <module><br>
><br>
> from vtkFilteringPython import *<br>
><br>
> ImportError: No module named vtkFilteringPython<br>
><br>
> Any thoughts that why this is happening?<br>
><br>
> Thanks<br>
><br>
><br>
</div></div>> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the VTK FAQ at:<br>
> <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
><br>
</blockquote></div><br></div>