View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000455 | ThirdParty | Bug | public | 2012-03-09 15:59 | 2012-03-09 16:33 |
Reporter | Assigned To | ||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | no change required | ||
Platform | Linux | OS | Linux Ubuntu | OS Version | 11.10 |
Summary | 0000455: ImportError: No module named vtkCommonPython | ||||
Description | On a Ubuntu 11.10, I have installed OpenFOAM and paraview as per the instructions on openFOAM's website, using the given Ubuntu package file for openFOAM. Further, I have installed pyFOAM. paraFOAM seems to start and produces plots, but when I start my python shell within paraview, I get the following: == Python 2.7.2+ (default, Oct 4 2011, 20:41:12) [GCC 4.6.1] on linux2 >>> from paraview.simple import * Traceback (most recent call last): File "<string>", line 4, in <module> File "/opt/paraviewopenfoam3120/lib/paraview-3.12/site-packages/paraview/servermanager.py", line 43, in <module> import paraview, re, os, os.path, new, sys, vtk File "/opt/paraviewopenfoam3120/lib/paraview-3.12/site-packages/paraview/vtk/__init__.py", line 1, in <module> from vtkCommonPython import * ImportError: No module named vtkCommonPython == Ideally, I would want to use paraview in batch mode to output results/images using pyFoamPVSnapshot.py, but when I launch this, I get: === rachelm@ubuntu:~/OpenFOAM/ram-2.1.0/run/tutorials/incompressible/icoFoam/cavity$ python pyFoamPVSnapshot.py Traceback (most recent call last): File "pyFoamPVSnapshot.py", line 3, in <module> from PyFoam.Applications.PVSnapshot import PVSnapshot File "/usr/local/lib/python2.7/dist-packages/PyFoam/Applications/PVSnapshot.py", line 13, in <module> from PyFoam.Paraview.ServermanagerWrapper import ServermanagerWrapper as SM File "/usr/local/lib/python2.7/dist-packages/PyFoam/Paraview/__init__.py", line 15, in <module> from paraview import servermanager File "/usr/lib/python2.7/dist-packages/paraview/servermanager.py", line 43, in <module> import paraview, re, os, os.path, new, sys, vtk File "/usr/lib/python2.7/dist-packages/paraview/vtk/__init__.py", line 1, in <module> from vtkCommonPython import * ImportError: No module named vtkCommonPython ==== On linux, I then try: locate vtkCommonPython, for which I get: == rachelm@ubuntu:~/OpenFOAM/ram-2.1.0/run/tutorials/incompressible/icoFoam/cavity$ locate vtkCommonPython /opt/paraviewopenfoam3120/lib/paraview-3.12/libvtkCommonPythonD.so /opt/paraviewopenfoam3120/lib/paraview-3.12/libvtkCommonPythonD.so.pv3.12 /usr/lib/libvtkCommonPythonD.so /usr/lib/libvtkCommonPythonD.so.5.6 /usr/lib/libvtkCommonPythonD.so.5.6.1 == This means that no such file vtkCommonPython is present. I have added all relevant dir's to python's path (sys.path.append in site.py), but it does not seem to make any difference. I even tried a fresh install, and I get the same errors. This seems to be an installation bug? My OF is 2.1 and my paraview is 3.12 | ||||
Steps To Reproduce | --As above-- | ||||
Tags | No tags attached. | ||||
|
Did you compile ParaView with python? Re: pyFoam - this is not supplied/supported by the official distribution |
|
Hi Andy, No, I did not do any specific compilation for ParaView with python. I installed it off the Ubuntu deb found on OpenFOAM's website. Could you let me know how you compile paraView with python in this case? Thanks. Rachel M |
|
I'm afraid that python support is not enabled by default in our deb packs - you will need to compile ParaView from source. We supply a helper script called makeParaView which can be found in our 3rd party sources. Using this script, simply add the '-python' option. To see the available options, use the '-help' option. |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-03-09 15:59 |
|
New Issue | |
2012-03-09 16:15 |
|
Note Added: 0001129 | |
2012-03-09 16:15 |
|
Priority | high => normal |
2012-03-09 16:15 |
|
Severity | major => minor |
2012-03-09 16:25 |
|
Note Added: 0001130 | |
2012-03-09 16:32 |
|
Note Added: 0001131 | |
2012-03-09 16:33 |
|
Status | new => resolved |
2012-03-09 16:33 |
|
Resolution | open => no change required |
2012-03-09 16:33 |
|
Assigned To | => user2 |