<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hey Wendel,<div><br></div><div>Do you have your LD_LIBRARY_PATH set to the directory where the .so libraries are located? If you haven't done a "make install" the VTK/Wrapping/Python/README.txt file has this entry:</div><div><br></div><div><div>&nbsp;&nbsp;(2) Using the package from the source build without installing it</div><div>&nbsp;&nbsp; &nbsp; &nbsp;system wide and without using `vtkpython`. &nbsp;This is most</div><div>&nbsp;&nbsp; &nbsp; &nbsp;useful when you build VTK off a CVS checkout and do not want</div><div>&nbsp;&nbsp; &nbsp; &nbsp;to install it system wide and still want to use the vanilla</div><div>&nbsp;&nbsp; &nbsp; &nbsp;Python interpreter. &nbsp;This is also useful if you are not the</div><div>&nbsp;&nbsp; &nbsp; &nbsp;administrator of the machine you are using/building VTK on.</div><div><br></div><div>&nbsp;&nbsp; &nbsp;Unix/Linux</div><div>&nbsp;&nbsp; &nbsp; &nbsp;Under Unix the way to do this is to set the `LD_LIBRARY_PATH`</div><div>&nbsp;&nbsp; &nbsp; &nbsp;(or equivalent) to the directory that contains the libvtk*.so</div><div>&nbsp;&nbsp; &nbsp; &nbsp;libraries. &nbsp;You must also set your `PYTHONPATH` to *both* the</div><div>&nbsp;&nbsp; &nbsp; &nbsp;directory that contains all the `libvtk*Python.so` files *and*</div><div>&nbsp;&nbsp; &nbsp; &nbsp;the `Wrapping/Python` directory. &nbsp;Under bash/sh something like</div><div>&nbsp;&nbsp; &nbsp; &nbsp;so needs to be done::</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$ export LD_LIBRARY_PATH=$LIBRARY_OUTPUT_PATH</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$ export PYTHONPATH=$VTK_ROOT/Wrapping/Python:${LIBRARY_OUTPUT_PATH}</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp;and under csh::</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$ setenv LD_LIBRARY_PATH ${LIBRARY_OUTPUT_PATH}</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$ setenv PYTHONPATH ${VTK_ROOT}/Wrapping/Python:${LIBRARY_OUTPUT_PATH}</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp;where VTK_ROOT is the directory where VTK is being built</div><div>&nbsp;&nbsp; &nbsp; &nbsp;(`VTK_BINARY_DIR`) and `LIBRARY_OUTPUT_PATH` (this variable is</div><div>&nbsp;&nbsp; &nbsp; &nbsp;set in `CMakeCache.txt`) is where the libraries are built.</div><div>&nbsp;&nbsp; &nbsp; &nbsp;Change this to suit your configuration.</div><div><br></div><div><br></div>-Eric</div><div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div>------------------------------------------------------</div><div>Eric E Monson</div><div>Duke Visualization Technology Group</div><div><span class="Apple-style-span" style="font-size: medium;"><br></span></div></span>
</div>
<br><div><div>On Sep 22, 2010, at 3:28 PM, Wendel Silva wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi,<br><br>I just compiled the last VTK version with the Wrapping for Python, but it doesnt seems to work here.<br>I didnt get errors during the compilation. I checked the access permission in the folders/files and looks fine. I checked the PYTHONPATH and everything seems right.<br>
<br>Im getting the following error:<br><br><blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">Traceback (most recent call last):<br>&nbsp; File "test.py", line 1, in &lt;module&gt;<br>
&nbsp;&nbsp;&nbsp; import vtk<br>&nbsp; File "/home/wendel/Desktop/vtk-build/Wrapping/Python/vtk/__init__.py", line 41, in &lt;module&gt;<br>&nbsp;&nbsp;&nbsp; from common import *<br>&nbsp; File "/home/wendel/Desktop/vtk-build/Wrapping/Python/vtk/common.py", line 7, in &lt;module&gt;<br>
&nbsp;&nbsp;&nbsp; from libvtkCommonPython import *<br>ImportError: libvtkCommonPythonD.so.5.7: cannot open shared object file: No such file or directory<br></blockquote><br>Im using vtk on Ubuntu 10.04 LTS.<br><br>Thanks,<br><br>Wendel B Silva<br>
_______________________________________________<br>Powered by <a href="http://www.kitware.com">www.kitware.com</a><br><br>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br><br>Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ">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">http://www.vtk.org/mailman/listinfo/vtkusers</a><br></blockquote></div><br></div></body></html>