[vtkusers] ImportError: No module named vtk - Installation problem VTK 6.1.0, Debian 7, Anaconda python ?
Karl Woelfer
kwoelfer at u.washington.edu
Fri Dec 12 12:54:36 EST 2014
Hello -
We recently installed vtk-5.10 on Ubuntu 12.04, Anaconda 1.4.0 python, no
problems.
Now we have moved to the Debian 7 OS and are attempting to install the
newest VTK 6.1.0, with Anaconda python 2.1.0
Our procedures (below) were modified for the new environment. Some
configuration parameters have changed in VTK also.
At the end of the install, our python test fails:
python -c "from vtk import vtkVersion; print
vtkVersion.GetVTKSourceVersion()"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named vtk
Is part of the problem with LD_LIBRARY_PATH? The previous VTK version 5.10
under Ubuntu 12.04 created a directory: /usr/local/lib/vtk-5.10
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/vtk-6.1 <<<< Don't know
where this is created
Thanks so much for suggestions to fix.
- KarlW
Visualization Toolkit (VTK) 6.1.0
Download the latest version of vtk source (VTK-6.1.0.tar.gz) and vtk-data
(VTKData-6.1.0.tar.gz) from
http://www.vtk.org/VTK/resources/software.html#latest
Copy to /usr/local; untar/unzip NOTE that the VTKData untars to
/usr/local/VTK-6.1.0/.ExternalData
cd to VTK-6.1.0; mkdir VTK_BUILD cd VTK_BUILD
sudo apt-get install libglu1-mesa-dev
Add /usr/include to PATH, export OPENLGL_INCLUDE_DIR=/usr/include/GL
ccmake ..
(hit c) to configure
BUILD_DOCUMENTATION *OFF (default)
BUILD_EXAMPLES *OFF
BUILD_SHARED_LIBS *OFF
BUILD_TESTING *ON
CMAKE_BUILD_TYPE *Debug
CMAKE_INSTALL_PREFIX */usr/local
EXECINFO_LIB *EXECINFO_LIB-NOTFOUND (default)
VTK_EXTRA_COMPILER_WARNINGS *OFF
VTK_Group_Imaging *OFF (default)
VTK_Group_MPI *OFF (default)
VTK_Group_Qt *OFF (default)
VTK_Group_Rendering *ON (default)
VTK_Group_Standalone *ON (default)
VTK_Group_Tk *OFF (default)
VTK_Group_Views *OFF (default)
VTK_Group_Web *OFF (default)
VTK_SMP_IMPLEMENTATION_TYPE *Sequential (default)
VTK_USE_LARGE_JAVA *OFF (default)
VTK_WRAP_JAVA *OFF
VTK_WRAP_PYTHON *OFF
VTK_WRAP_TCL *OFF
Then, run make to compile VTK
sudo make -j12 (this will use parallel compilation on a 12 - 16 core
workstation)
sudo make install
--------------------------
sudo apt-get install tk-dev
cd VTK_BUILD
ccmake ..
(hit c) to configure
enable BUILD_SHARED_LIBS
CMAKE_INSTALL_PREFIX is default /usr/local
enable VTK_WRAP_PYTHON
enter advanced configuration by pressing "t"
PYTHON_INCLUDE_DIR /usr/local/anaconda/include/python2.7
PYTHON_LIBRARY /usr/local/anaconda/lib/libpython2.7.so PYTHON_EXECUTABLE
/usr/local/anaconda/bin/python2.7
VTK_DATA_STORE /usr/local/VTK-6.1.0 ?
VTK_INSTALL_PYTHON_MODULE_DIR /usr/local/lib/python./site-packages ?
"c" to configure
"g" to generate
sudo make -j12
sudo make install
------------------------
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/vtk-6.1 <<<< Don't
know where this is created
TEST: python -c "from vtk import vtkVersion; print
vtkVersion.GetVTKSourceVersion()"
EXPECT vtk version 6.1.0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20141212/6e4b5e5e/attachment.html>
More information about the vtkusers
mailing list