CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Paraview & paraFoam (
-   -   ParaView 33 Python Shell error (

mschoenberg August 19, 2008 15:05

I've just built ParaView 3.3 a
I've just built ParaView 3.3 after enabling Python in the CMakeLists.txt file. It seemed to build fine, but when I attempt to run the python shell, it brings up the shell with this message:

>>> from paraview import servermanager
Traceback (most recent call last):
File "<string>", line 1, in ?
File "/home/michael/OLDOF/OpenFOAM/ThirdParty/ParaView3.3-cvs/platforms/linux64Icc/Ut ilities/VTKPythonWrapping/paraview/", line 43, in ?
import re, os, new, exceptions, sys, vtk
File "/home/michael/OLDOF/OpenFOAM/ThirdParty/ParaView3.3-cvs/platforms/linux64Icc/Ut ilities/VTKPythonWrapping/paraview/", line 4, in ?
from libvtkCommonPython import *
ImportError: No module named libvtkCommonPython

I've looked around and the file exists in both the /ParaView3.3-cvs/platforms/linux64Icc/bin directory and the /ParaView3.3-cvs/platforms/linux64Icc/lib directory. I've updated my LD_LIBRARY_PATH to include the location of these libraries, but this has failed to solve the problem.

Any help is greatly appreciated.

gschaider August 19, 2008 17:32

No. Python wants to find the .
No. Python wants to find the .so's as modules (and for those it looks in PYTHONPATH). So in ~/OpenFOAM/OpenFOAM-1.5/etc/apps/paraview3/bashrc after the lines that set the PYTHONPATH to the .py-files:

if [ "$PYTHONPATH" ]; then
export PYTHONPATH=$PYTHONPATH:$ParaView_DIR/Utilities/VTKPythonWrapping
export PYTHONPATH=$ParaView_DIR/Utilities/VTKPythonWrapping

add this line

export PYTHONPATH=$ParaView_DIR/lib/paraview-3.3/:$PYTHONPATH

restart the shell and everything should be fine (it was for me). If you're using tcsh something similar should be done.

If it works for you, could you please file a report in the Bugs-section so that it will be fixed in the next Release?

mschoenberg August 20, 2008 10:42

Thanks a bunch, this solved th
Thanks a bunch, this solved the problem. I'll file a bug report.

All times are GMT -4. The time now is 11:24.