Am I missing a step in creating / installing VTK-5.4 with Python2.6 bindings on Ubuntu 9.04?

I have successfully built and installed VTK-5.4 with Python bindings from the source. However, when I try to import VTK in python, it gives the following Traceback error

File, line 1, in

File "/ usr / local / lib / python 2.6 / dist-packages / VTK-5.4.2-py2.6.egg / vtk / init .py", line 41, from general import *

File "/ usr / local / lib / python 2.6 / dist-packages / VTK-5.4.2-py2.6.egg / vtk / common.py", line 7, from libvtkCommonPython import *

ImportError: libvtkCommonPythonD.so.5.4: cannot open shared objects file: no such file or directory

So I wonder what I'm missing? I tried to add / usr / local / lib / vtk -5.4 to both the PATH and PYTHONPATH environment variables and get the same result. Any hints or suggestions?

Note: libvtkCommonPythonD.so.5.4 exists in / usr / local / lib / vtk -5.4 as a symbolic link to libvtkCommonPythonD.so.5.4.2

+3
source share
1 answer

Check if it adds /usr/local/libto your $LD_LIBRARY_PATH:

In the shell:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

If it works, make it permanent (by adding /usr/local/libin /etc/ld.so.conf) _ (by running ' ldconfig -n /usr/local/lib')

+5
source

Source: https://habr.com/ru/post/1709867/


All Articles