[vtkusers] VTK Python Wrap - libvtkCommonPythonD.so.5.7: cannot open shared object file

Eric E. Monson emonson at cs.duke.edu
Wed Sep 22 15:35:06 EDT 2010


Hey Wendel,

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:

  (2) Using the package from the source build without installing it
      system wide and without using `vtkpython`.  This is most
      useful when you build VTK off a CVS checkout and do not want
      to install it system wide and still want to use the vanilla
      Python interpreter.  This is also useful if you are not the
      administrator of the machine you are using/building VTK on.

    Unix/Linux
      Under Unix the way to do this is to set the `LD_LIBRARY_PATH`
      (or equivalent) to the directory that contains the libvtk*.so
      libraries.  You must also set your `PYTHONPATH` to *both* the
      directory that contains all the `libvtk*Python.so` files *and*
      the `Wrapping/Python` directory.  Under bash/sh something like
      so needs to be done::

        $ export LD_LIBRARY_PATH=$LIBRARY_OUTPUT_PATH
        $ export PYTHONPATH=$VTK_ROOT/Wrapping/Python:${LIBRARY_OUTPUT_PATH}

      and under csh::

        $ setenv LD_LIBRARY_PATH ${LIBRARY_OUTPUT_PATH}
        $ setenv PYTHONPATH ${VTK_ROOT}/Wrapping/Python:${LIBRARY_OUTPUT_PATH}

      where VTK_ROOT is the directory where VTK is being built
      (`VTK_BINARY_DIR`) and `LIBRARY_OUTPUT_PATH` (this variable is
      set in `CMakeCache.txt`) is where the libraries are built.
      Change this to suit your configuration.


-Eric

------------------------------------------------------
Eric E Monson
Duke Visualization Technology Group


On Sep 22, 2010, at 3:28 PM, Wendel Silva wrote:

> Hi,
> 
> I just compiled the last VTK version with the Wrapping for Python, but it doesnt seems to work here.
> 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.
> 
> Im getting the following error:
> 
> Traceback (most recent call last):
>   File "test.py", line 1, in <module>
>     import vtk
>   File "/home/wendel/Desktop/vtk-build/Wrapping/Python/vtk/__init__.py", line 41, in <module>
>     from common import *
>   File "/home/wendel/Desktop/vtk-build/Wrapping/Python/vtk/common.py", line 7, in <module>
>     from libvtkCommonPython import *
> ImportError: libvtkCommonPythonD.so.5.7: cannot open shared object file: No such file or directory
> 
> Im using vtk on Ubuntu 10.04 LTS.
> 
> Thanks,
> 
> Wendel B Silva
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100922/a6d4e69b/attachment.htm>


More information about the vtkusers mailing list