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

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-02 07:49:09

问题


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

File "", line 1, in

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

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

ImportError: libvtkCommonPythonD.so.5.4: cannot open shared object file: No such file or directory

So I am wondering what I am missing? I have tried adding /usr/local/lib/vtk-5.4 to both PATH and PYTHONPATH environment variables and still get the same result. Any hints or suggestions?

NOTE: libvtkCommonPythonD.so.5.4 exists in /usr/local/lib/vtk-5.4 as a symlink to libvtkCommonPythonD.so.5.4.2


回答1:


Test if adding /usr/local/lib to your $LD_LIBRARY_PATH helps:

In a shell:

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

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



来源:https://stackoverflow.com/questions/956716/am-i-missing-step-in-building-installing-vtk-5-4-with-python2-6-bindings-on-ubun

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!