[vtkusers] vtkpython imports vtk fine when run on the same install directory, but not elsewhere

William Oquendo woquendo at gmail.com
Sat Jun 25 18:15:10 EDT 2016


Dear all,
I am in Mac Os X Yosemite. Trying to fix "import vtk" errors, I downloaded
and moved vtkpython onto /Applications. If I go to taht directory and run
vtkpython and try to import vtk, everything works:
$ cd /Applications/vtkpython/bin
$ ./vtkpython
vtk version 7.0.0
Python 2.7.10 (default, Jul 14 2015, 19:46:27)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import vtk
No error.
But, if run vtkpython from another directory , I get the interpreter but it
cannot import vtk:
$ /Applications/vtkpython/bin/vtkpython
vtk version 7.0.0
Python 2.7.10 (default, Jul 14 2015, 19:46:27)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import vtk
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named vtk

​BTW, the following variables are set:
$ echo $PYTHONPATH
:/Applications/vtkpython/lib/:/Applications/vtkpython/bin/vtk/
$ echo $LD_LIBRARY_PATH
:/Applications/vtkpython/lib/:/Applications/vtkpython/bin/vtk/

Could you please help to fix this and be able to run vtkpython from outside
the installation directory?

Thanks in advance​


-- 

Best regards / Cordialmente,

William-Fernando Oquendo
--------------------------
Este correo puede carecer de tildes o eñes debido al teclado.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160625/38cc0973/attachment.html>


More information about the vtkusers mailing list