|
[Sponsors] |
[OpenFOAM] paraview v4 - building with python - OF2.3.0, PVv4, Python 2.7 |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 13, 2014, 08:31 |
paraview v4 - building with python - OF2.3.0, PVv4, Python 2.7
|
#1 | |||
Senior Member
Join Date: Nov 2012
Location: Bavaria
Posts: 145
Rep Power: 13 |
Hi Foamers,
since I want to use the feature Edit | Find Data in ParaView v4 I've successfully followed wyldckat's instructions. To set-up the Python environment, I added the following lines in "~/.bashrc", after the line for OpenFOAM that ends with bashrc: Quote:
Quote:
Code:
Error: Could not import vtkCommonComputationalGeometryPython Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/elisabeth/OpenFOAM/ThirdParty-2.3.0/platforms/linux64Gcc/ParaView-4.1.0/lib/paraview-4.1/site-packages/paraview/simple.py", line 41, in <module> import servermanager File "/home/elisabeth/OpenFOAM/ThirdParty-2.3.0/platforms/linux64Gcc/ParaView-4.1.0/lib/paraview-4.1/site-packages/paraview/servermanager.py", line 48, in <module> import paraview, re, os, os.path, new, sys, atexit, vtk File "/home/elisabeth/OpenFOAM/ThirdParty-2.3.0/platforms/linux64Gcc/ParaView-4.1.0/lib/paraview-4.1/site-packages/paraview/vtk/__init__.py", line 7, in <module> from vtkCommonCorePython import * ImportError: No module named vtkCommonCorePython Quote:
Does the error cause further problems? Aylalisa |
||||
June 13, 2014, 09:15 |
|
#2 |
Senior Member
|
Hi,
This line is for PV 3.12 Code:
export PYTHONPATH=$PYTHONPATH:$ParaView_DIR/lib/paraview-3.12/site-packages Code:
export PYTHONPATH=$PYTHONPATH:$ParaView_DIR/lib/paraview-4.1/site-packages:$ParaView_DIR/lib/paraview-4.1/site-packages/vtk Code:
$ python Python 2.7.6 (default, Nov 21 2013, 15:55:38) [GCC] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from paraview.simple import * paraview version 4.1.0 >>> Last edited by alexeym; June 13, 2014 at 09:16. Reason: typo |
|
June 13, 2014, 09:25 |
|
#3 |
Senior Member
Join Date: Nov 2012
Location: Bavaria
Posts: 145
Rep Power: 13 |
Hi Alexey,
my .bashrc file Code:
PYTHONPATH=$PYTHONPATH:/usr/lib64/python2.7/site-packages PYTHONPATH=$PYTHONPATH:/home/aylalisa/OpenFOAM/ThirdParty-2.3.0/platforms/linux64Gcc/ParaView-4.1.0/lib/paraview-4.1/site-packages export PYTHONPATH According to your path /vtk is missing. I've add /vtk --> it works. I get this output, too! Thank you! Aylalisa |
|
June 13, 2014, 09:34 |
|
#4 |
Senior Member
|
Hi,
in my code snippet there was .../paraview-4.1/site-packages but also .../paraview-4.1/site-packages/vtk. Without second entry I had the following error: Code:
$ export PYTHONPATH=$PYTHONPATH:$ParaView_DIR/lib/paraview-4.1/site-packages $ python Python 2.7.6 (default, Nov 21 2013, 15:55:38) [GCC] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from paraview.simple import * Error: Could not import vtkCommonComputationalGeometryPython Traceback (most recent call last): File "<stdin>", line 1, in <module> File ".../ParaView-4.1.0/lib/paraview-4.1/site-packages/paraview/simple.py", line 41, in <module> import servermanager File ".../ParaView-4.1.0/lib/paraview-4.1/site-packages/paraview/servermanager.py", line 48, in <module> import paraview, re, os, os.path, new, sys, atexit, vtk File ".../ParaView-4.1.0/lib/paraview-4.1/site-packages/paraview/vtk/__init__.py", line 7, in <module> from vtkCommonCorePython import * ImportError: No module named vtkCommonCorePython >>> Code:
$ export PYTHONPATH=$PYTHONPATH:$ParaView_DIR/lib/paraview-4.1/site-packages:$ParaView_DIR/lib/paraview-4.1/site-packages/vtk $ python Python 2.7.6 (default, Nov 21 2013, 15:55:38) [GCC] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from paraview.simple import * paraview version 4.1.0 >>> |
|
June 13, 2014, 09:52 |
|
#5 |
Senior Member
Join Date: Nov 2012
Location: Bavaria
Posts: 145
Rep Power: 13 |
The only change I made was to add site-packages/vtk at the end of the second path variable set-up.
Before that change I've received the error. After changing and sourcing .bashrc I've received... Code:
>>> from paraview.simple import* paraview version 4.1.0 >>> PYTHONPATH was not set at all on my system. But honestly speaking, I have not tried pvpython before. Am at the beginning concerning usage of python with openfoam and paraview. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM.com] Trouble building Paraview from ThirdPartyv1812 folder with python and mpi support | praphul | OpenFOAM Installation | 4 | April 8, 2019 02:26 |
[General] Building Paraview 4.1.0 with MPI and Python support | reynoldsStress | ParaView | 10 | July 27, 2017 09:38 |
[foam-extend.org] Error compiling OpenFOAM-1.6-ext | Canesin | OpenFOAM Installation | 137 | January 20, 2016 15:56 |
Python support when building Paraview ? | francois | OpenFOAM Installation | 2 | June 16, 2014 16:37 |
Compilation error OF1.5-dev on Suse10.3 | darenyang | OpenFOAM Installation | 0 | April 29, 2009 05:55 |