|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Fabian
Join Date: Jan 2010
Posts: 27
Rep Power: 16 ![]() |
Hello everybody,
I do my first steps with pyFoam and it works out very well so long, but now i try to use some state-files of paraview using "pyFoamPVLoadState.py --state==teststate.pvsm cavity" The result is an error message: " Traceback (most recent call last): File "/usr/local/bin/pyFoamPVLoadState.py", line 3, in <module> from PyFoam.Applications.PVLoadState import PVLoadState File "/usr/local/lib/python2.6/dist-packages/PyFoam/Applications/PVLoadState.py", line 11, in <module> from PyFoam.Paraview.ServermanagerWrapper import ServermanagerWrapper as SM File "/usr/local/lib/python2.6/dist-packages/PyFoam/Paraview/__init__.py", line 15, in <module> from paraview import servermanager ImportError: No module named paraview " Paraview 3.6.1 is installed, so what does this error mean and how can I avoid it... |
|
![]() |
![]() |
![]() |
![]() |
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 ![]() ![]() |
Quote:
Bernhard |
||
![]() |
![]() |
![]() |
![]() |
#3 |
New Member
Fabian
Join Date: Jan 2010
Posts: 27
Rep Power: 16 ![]() |
Thanks, I think, you got it.
Do you know any tutorial or anything like this describing how to activate the python support??? Regrads |
|
![]() |
![]() |
![]() |
![]() |
#4 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 ![]() ![]() |
Quote:
Bernhard |
||
![]() |
![]() |
![]() |
![]() |
#5 |
Member
Antonio Liggieri
Join Date: Aug 2010
Posts: 76
Rep Power: 15 ![]() |
Hello Gautcho,
I have currently the same problem and I tried to switch all the SET(ENABLE_PYTHON = OFF) to SET(ENABLE_PYTHON = ON) stuff into several files within the ThirdParty directory. But after recompiling they are all set again to OFF!! There must be an other "switch" to manipulate. Did you find out how to do it? I took just a look into the makeParaviw script, but I couldn't make clearly out any option to switch ON or OFF the PYTHON support... Thanx in advance for any input, Antonio |
|
![]() |
![]() |
![]() |
![]() |
#6 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 ![]() ![]() |
Quote:
Bernhard |
||
![]() |
![]() |
![]() |
![]() |
#7 |
Member
Antonio Liggieri
Join Date: Aug 2010
Posts: 76
Rep Power: 15 ![]() |
Hello Bernhard,
yes exactly I mean the makeParaView Script.. I want to install Paraview with Python support in order to be able to use your contribution, and I'm following this hin on OpenFoamWiki: http://openfoamwiki.net/index.php/Us...s/Installation This is how it looks like within my makeParaView script after modifying it: # Python support: # note: script will try to determine the appropriate python library. # If it fails, specify the path using the PYTHON_LIBRARY variable withPYTHON=true #PYTHON_LIBRARY="" PYTHON_LIBRARY="/usr/lib/libpython2.6.so.1.0" PYTHON_INCLUDE="/usr/include/python2.6" According to the OpenFoamWiki I changed also the File: $WM_PROJECT_INST_DIR/ThirdParty-1.6.x/tools/makeParaViewFunctions. When I run then the makeParaView script again, it starts quite well until this step: Scanning dependencies of target vtkWrapPython Scanning dependencies of target vtkWrapPythonInit [ 0%] [ 0%] Building C object VTK/Wrapping/CMakeFiles/vtkWrapPython.dir/vtkWrapPython.c.o Building C object VTK/Wrapping/CMakeFiles/vtkWrapPythonInit.dir/vtkWrapPythonInit.c.o After this step it breaks up saying: this file not found that file not found the other file not found what am I doing wrong??? Any Idea?? |
|
![]() |
![]() |
![]() |
![]() |
#8 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 ![]() ![]() |
Quote:
|
||
![]() |
![]() |
![]() |
![]() |
#9 |
Member
Antonio Liggieri
Join Date: Aug 2010
Posts: 76
Rep Power: 15 ![]() |
Hy Bernhard,
thank you very much for your input. I didn't have even ccmake installed, and it's in fact far easier to handle! But unfortunately it didn't solve my problem - I found the newly built directory and I checked all the PYTHON related options. 1)They are set all to ON. 2)Besides I switched the CMAKE Verbose Make option to ON as well, 3)and then configured with ccmake. It configures fine no error!! But in Paraview the Python Shell Option under Tools is still deactivated. And your pyFoam script doesn't work neither - No module named paraview! If I try to run "make" in the current directory after having completed point 3) - I receive the Error listed below. p@poyry:~/OpenFOAM/ThirdParty-1.7.1/...araview-3.8.0$ make [ 0%] Building C object VTK/Wrapping/CMakeFiles/vtkWrapPython.dir/vtkWrapPython.c.o In file included from /home/poyry/OpenFOAM/ThirdParty-1.7.1/paraview-3.8.0/VTK/Common/vtkPython.h:46, from /home/poyry/OpenFOAM/ThirdParty-1.7.1/paraview-3.8.0/VTK/Wrapping/vtkWrapPython.c:16: /home/poyry/OpenFOAM/ThirdParty-1.7.1/paraview-3.8.0/VTK/Common/Python.h:7:24: error: patchlevel.h: No such file or directory Do I have to set an environment variable or somthing?? The only one I set is in my .bashrc for OpenFAOM!!! That's it! |
|
![]() |
![]() |
![]() |
![]() |
#10 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 ![]() ![]() |
Quote:
Bernhard |
||
![]() |
![]() |
![]() |
![]() |
#11 |
Member
Antonio Liggieri
Join Date: Aug 2010
Posts: 76
Rep Power: 15 ![]() |
Hello Bernhard,
finally I could enable the python support in my Paraview but unfortunately neither the loadstate nor the snapshot tool works... I receive still the same error message: poyry@CHZRH-WS-C10176:~/OpenFOAM/poyry-1.7.1/run/tutorials/incompressible/icoFoam/cavity$ pyFoamPVLoadState.py --state=cavity.psvm cavity Traceback (most recent call last): File "/usr/local/bin/pyFoamPVLoadState.py", line 3, in <module> from PyFoam.Applications.PVLoadState import PVLoadState File "/usr/local/lib/python2.6/dist-packages/PyFoam/Applications/PVLoadState.py", line 11, in <module> from PyFoam.Paraview.ServermanagerWrapper import ServermanagerWrapper as SM File "/usr/local/lib/python2.6/dist-packages/PyFoam/Paraview/__init__.py", line 15, in <module> from paraview import servermanager ImportError: No module named paraview It is strange - other applications of PyFoam like pyFoamPlotWatcher.py work well! Any idea? |
|
![]() |
![]() |
![]() |
![]() |
#12 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 ![]() ![]() |
Quote:
Bernhard |
||
![]() |
![]() |
![]() |
![]() |
#13 |
Member
Antonio Liggieri
Join Date: Aug 2010
Posts: 76
Rep Power: 15 ![]() |
your hint led my in the right direction.
my variable or alias or whatever "$ParaView_DIR" that is used in the etc/apps/paraview/bashrc-file led me to the wrong path. Once set the whole right path instead of "$ParaView_DIR" within the paths containing "Utilities" in the etc/apps/paraview/bashrc-file, the pyFoamPVLoadState.py worked, whereas the snapshot utility still fails. but But there is a hint, that this is something ralated to all OF versions >=1.6. Is this still an unsolved problem? If yes - are there other possibilities to do automatized postprozessing? Best regards and thank you again for the hint, Antonio |
|
![]() |
![]() |
![]() |
![]() |
#14 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 ![]() ![]() |
Quote:
Bernhard |
||
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[ICEM] Problems with coedge curves and surfaces | tommymoose | ANSYS Meshing & Geometry | 6 | December 1, 2020 11:12 |
[mesh manipulation] Problems with rotational cyclic boundaries | TReviol | OpenFOAM Meshing & Mesh Conversion | 8 | July 11, 2014 03:45 |
[ICEM] Flow channel meshing problems | StefanG | ANSYS Meshing & Geometry | 19 | May 15, 2012 06:44 |
Two-phase air water flow problems by activating Wall Lubrication Force | challenger85 | CFX | 5 | November 5, 2009 05:44 |
Help required to solve Hydraulic related problems | aero | CFX | 0 | October 30, 2006 11:00 |