CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Paraview & paraFoam

ParaView 33 Python Shell error

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   August 19, 2008, 15:05
Default I've just built ParaView 3.3 a
  #1
New Member
 
Michael Schoenberg
Join Date: Mar 2009
Posts: 9
Rep Power: 8
mschoenberg is on a distinguished road
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/servermanager.py", 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/vtk.py", line 4, in ?
from libvtkCommonPython import *
ImportError: No module named libvtkCommonPython


I've looked around and the libvtkCommonPython.so 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.
mschoenberg is offline   Reply With Quote

Old   August 19, 2008, 17:32
Default No. Python wants to find the .
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
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
else
export PYTHONPATH=$ParaView_DIR/Utilities/VTKPythonWrapping
fi

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?
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   August 20, 2008, 10:42
Default Thanks a bunch, this solved th
  #3
New Member
 
Michael Schoenberg
Join Date: Mar 2009
Posts: 9
Rep Power: 8
mschoenberg is on a distinguished road
Thanks a bunch, this solved the problem. I'll file a bug report.
mschoenberg is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error in Paraview mahaputra OpenFOAM Paraview & paraFoam 0 March 11, 2009 17:09
Paraview3 python scripting tomislav_maric OpenFOAM Paraview & paraFoam 1 October 6, 2008 16:47
Compilation error with paraview quartzian OpenFOAM Installation 0 September 21, 2008 08:32
ParaView 33 Python Shell error and fix mschoenberg OpenFOAM Bugs 1 August 21, 2008 04:43
Python Skripts for IGG Ole Ritter NUMECA 2 April 21, 2003 05:02


All times are GMT -4. The time now is 01:55.