|
[Sponsors] |
March 19, 2012, 11:37 |
Problems with installing PyFoam
|
#1 |
Member
Join Date: Nov 2009
Posts: 34
Rep Power: 17 |
Hallo,
I'm trying to install PyFoam, I use OpenFoam 1.7.1 on OpenSuse 11.4. I tried it several times , with the description of the Wiki, as user and as root. Some applications work others not. One imported Application is pyFoamDisplayBlockMesh.py but I got that Error: Code:
Trying VTK implementation from Paraview Traceback (most recent call last): File "/home/nonroot/my_python/bin/pyFoamDisplayBlockMesh.py", line 5, in <module> from PyFoam.Applications.DisplayBlockMeshQt import DisplayBlockMesh File "/usr/local/lib/python2.7/site-packages/PyFoam/Applications/DisplayBlockMeshQt.py", line 30, in <module> doImports() File "/usr/local/lib/python2.7/site-packages/PyFoam/Applications/DisplayBlockMeshQt.py", line 28, in doImports error("Error while importing modules:",e) File "/usr/local/lib/python2.7/site-packages/PyFoam/Error.py", line 49, in error raise FatalErrorPyFoamException(*text) PyFoam.Error.FatalErrorPyFoamException: FatalError in PyFoam: 'PyFoam FATAL ERROR on line 28 of file /usr/local/lib/python2.7/site-packages/PyFoam/Applications/DisplayBlockMeshQt.py: Error while importing modules: No module named paraview' |
|
March 19, 2012, 12:14 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
|
||
March 20, 2012, 04:16 |
|
#3 |
Member
Join Date: Nov 2009
Posts: 34
Rep Power: 17 |
Thank you Bernhard,
I installed the missing libraries an now it works and I can starting to discover PyFoam! Christoph |
|
March 20, 2012, 06:26 |
|
#4 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
||
November 28, 2012, 12:09 |
needs help to find my mistake
|
#5 | ||
New Member
Join Date: Jan 2012
Posts: 8
Rep Power: 14 |
Hello everyone,
I am struggling to get the following command to behave. Code:
pyFoamDisplayBlockMesh.py constant/polyMesh/blockMeshDict Quote:
Code:
pyFoamVersion.py Quote:
vtk -> checked The only issue seems to be the PYTHONPATH. Does anyone now what I have to set in my ~/.bashrc? |
|||
November 28, 2012, 14:59 |
|
#6 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
vtk and PyQT4 are there (according to pyFoamVersion) and have already been loaded during that state of the problem. You don't have to set the PYTHONPATH (this output is mainly there to find out whether other libraries than the system versions are used). You followed the first rule of pyFoam-Error-Reporting: pyFoamVersion. And this leads to the probable problem: your version is rather old (0.5.5) and was definitely released before 2.0. In that version (at least as far as I remember) the format of the blockMeshDict changed (especially with the patches). Current versions are tolerant about this but 0.5.5 can't possibly know about this. Solution: install the current pyFoam-version (0.5.7). If the version you're using is system-wide installed and you can't easily replace it, then install it locally in your account and THEN you have to set PYTHONPATH
__________________
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 |
||
November 29, 2012, 07:20 |
|
#7 |
New Member
Join Date: Jan 2012
Posts: 8
Rep Power: 14 |
Thank you very much Bernhard. I did not check there was a newer version of PyFoam before installing PyFoam 0.5.5, big mistake, thank you for pointing this out.
When I install PyFoam 0.5.7 the same way I installed the previous version, when I run: pyFoamVersion.py I still get as output that I am using PyFoam 0.5.5 version Do you know how I could overwrite it? Thank you very much Rom |
|
November 29, 2012, 10:45 |
|
#8 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
http://openfoamwiki.net/index.php/Co...a_regular_user Probably you've got to set PYTHONPATH (and also PATH) to you installation so that it "shadows" the system-installation
__________________
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 |
||
November 29, 2012, 12:46 |
|
#9 | |
New Member
Join Date: Jan 2012
Posts: 8
Rep Power: 14 |
Quote:
Amazing piece of software, really thanks Bernhard for simplifying OpenFOAM with PyFoam. |
||
November 30, 2012, 10:59 |
|
#10 | |
New Member
Join Date: Jan 2012
Posts: 8
Rep Power: 14 |
Quote:
|
||
November 30, 2012, 13:20 |
|
#11 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
No it is not. Usually the first plot windows should pop up once pyFoam found the second timestep in the output. It does so by looking for the usual time string "Time = x.xxx" in the output. If that is different for a solver (happens) another pattern can be specified
__________________
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 |
|
January 1, 2013, 09:42 |
|
#12 |
New Member
DDB
Join Date: Jan 2013
Posts: 12
Rep Power: 13 |
Hi, I am very new to all this (inc forums) and very frustrated!!
I can't get pyFoamDisplayBlockMesh.py constant/polyMesh/blockMeshDict to work, so any help would be gratefully appreciated! pyFoamDisplayBlockMesh.py constant/polyMesh/blockMeshDict gives Traceback (most recent call last): File "/usr/bin/pyFoamDisplayBlockMesh.py", line 5, in <module> from PyFoam.Applications.DisplayBlockMeshQt import DisplayBlockMesh File "/usr/lib/python2.7/site-packages/PyFoam/Applications/DisplayBlockMeshQt.py", line 33, in <module> doImports() File "/usr/lib/python2.7/site-packages/PyFoam/Applications/DisplayBlockMeshQt.py", line 31, in doImports error("Error while importing modules:",e) File "/usr/lib/python2.7/site-packages/PyFoam/Error.py", line 49, in error raise FatalErrorPyFoamException(*text) PyFoam.Error.FatalErrorPyFoamException: FatalError in PyFoam: 'PyFoam FATAL ERROR on line 31 of file /usr/lib/python2.7/site-packages/PyFoam/Applications/DisplayBlockMeshQt.py: Error while importing modules: No module named paraview' and pyFoamVersion.py gives Python version: 2.7.3 (default, Jul 24 2012, 10:05:38) [GCC 4.7.0 20120507 (Red Hat 4.7.0-5)] PYTHONPATH: /usr/lib64/python2.7/site-packages/openmpi OpenFOAM (2, 1, 1) of the installed versions ['2.1.1'] pyFoam-Version: 0.5.7 Configuration search path: [('file', '/etc/pyFoam/pyfoamrc'), ('directory', '/etc/pyFoam/pyfoamrc.d'), ('file', '/home/natalie/.pyFoam/pyfoamrc'), ('directory', '/home/natalie/.pyFoam/pyfoamrc.d')] Configuration files (used): [] Installed libraries: Gnuplot : Yes version: 1.8 ply : No Not a problem. Version from ThirdParty is used Numeric : No Not supported anymore. No need to install it numpy : Yes version: 1.6.2 matplotlib : No Only Gnuplot-plotting possible psyco : No Not a problem. Acceleration not possible hotshot : Yes profile : Yes cProfile : Yes PyQt4 : Yes PyQt4.Qwt5 : No Only an alternate plotting back-end vtk : No Not a problem. Only used for some utilities Tkinter : Yes version: $Revision: 81008 $ mercurial : No Not a problem. Used for experimental case handling but Package vtk-5.8.0-6.fc17.x86_64 already installed and latest version Package paraview-3.14.1-3.fc17.x86_64 already installed and latest version I have installed as root and there is nothing in my .bashrc for pyFoam... Please help! |
|
January 1, 2013, 10:25 |
|
#13 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings DDB and welcome to the forum!
The answer was given on the second post: Quote:
Code:
vtk-python vtk-qt pyqt4 Code:
yum install vtk-python vtk-qt pyqt4 Bruno PS: If OpenFOAM's plugins for ParaView are properly installed and you have at least OpenFOAM 2.0.0, then you can use the following command as well: Code:
paraFoam -block
__________________
Last edited by wyldckat; January 1, 2013 at 10:33. Reason: added PS |
||
January 1, 2013, 10:37 |
|
#14 |
New Member
DDB
Join Date: Jan 2013
Posts: 12
Rep Power: 13 |
Hi wyldckat, Thank you very much for your help! It works now!
Your instructions look very different to the 2nd post though, so I am not surprised a newbie like me didn't understand!! |
|
April 27, 2013, 15:35 |
PyFoam mac displayblockmesh error
|
#15 | ||
New Member
Simone Martini
Join Date: Apr 2013
Posts: 11
Rep Power: 13 |
I have a mac lion 1.7, and recently installed OpenFOAM 2.1 with paraview 3.14.1. I am interested in using PyFoam. Already installed 0.6 using the guides on the openfoam wiki site. Unfortunately find an error which I cannot fix:
Quote:
Quote:
|
|||
April 28, 2013, 07:22 |
|
#16 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings Simone and welcome to the forum!
This is roughly on section 10.4: http://openfoamwiki.net/index.php/Co...paraview-stuff But since this installation on Mac OS X uses a pre-built ParaView version... a quick hack would be to add the following code to before or after that the code in "bashrc" that you've provided: Code:
ParaView_DIR="/Applications/Paraview_3.14.1.app/Contents/MacOS/" if [ "$PYTHONPATH" ]; then export PYTHONPATH=$PYTHONPATH:$ParaView_DIR/Utilities/VTKPythonWrapping else export PYTHONPATH=$ParaView_DIR/Utilities/VTKPythonWrapping fi Best regards, Bruno
__________________
|
|
April 28, 2013, 18:15 |
|
#17 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
In my experience the easiest way to get a VTK that works with pyFoamDisplayBlockMesh.py on a Mac is to use MacPorts. Something like port install vtk5 +python27 +qt4_mac should install it with python and QT-support (if you use a different python adapt it). Also use port install py27-pyqt4 if PyQT is not yet installed
__________________
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 |
||
May 2, 2013, 05:50 |
PyFoam
|
#18 |
New Member
Simone Martini
Join Date: Apr 2013
Posts: 11
Rep Power: 13 |
this reply is in response to the last 2 posts. initially we tried wyldckat's suggestion and that got us past the paraview error provided we supplied the correct addresses for the paraview installation folder (different from the post). However we had a different PyQt4 error immediately after.
after that we tried the macports installation of PyQt4 etc... as described by gschaider, however we still get the original paraview error in this case. So far I have set pyqt4 module folder "/opt/local/share/py27-sip/PyQt4" to be added to PYTHONPATH and tried to confirm this by doing "import PyQt4" i get an error that module doesnt exist. On the internet it does say there is a support problem for PyQt4 and Mac lion OSX, so we are sort of stuck. the suggestion on the web is to fiddle with the installation package, but we're not sure how to do this. if there is any suggestion on how to do this plz help! |
|
May 4, 2013, 07:49 |
|
#19 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
- Start python and on the Python-Shell try importing it: "import PyQt4" - run pyFoamVersion.py and post the result here
__________________
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 |
||
May 8, 2013, 16:30 |
|
#20 |
New Member
Simone Martini
Join Date: Apr 2013
Posts: 11
Rep Power: 13 |
dear geschaider, after a bit of fiddling with the folders, we have the PyQt4 installed and able to import it in python. the vtk package must also be installed, however it shows the following erro after runnung the code "pyFoamVersion.py"
Code:
Installed libraries: Gnuplot : No Not a problem. Version from ThirdParty is used ply : No Not a problem. Version from ThirdParty is used Numeric : No Not supported anymore. No need to install it /Applications/Paraview_3.98.1.app/Contents/Python/numpy/random/__init__.py:87: RuntimeWarning: compiletime version 2.6 of module 'mtrand' does not match runtime version 2.7 from mtrand import * numpy : Yes version: 1.6.2 matplotlib : Yes version: 1.1.1 psyco : No Not a problem. Acceleration not possible hotshot : Yes profile : Yes cProfile : Yes PyQt4 : Yes PyQt4.Qwt5 : No Only an alternate plotting back-end vtk : Error: Could not import vtkCommonComputationalGeometryPython No Not a problem. Only used for some utilities Tkinter : Yes version: $Revision: 81008 $ mercurial : No Not a problem. Used for experimental case handling nose : No Only needed for running the unit-tests (developers only) twisted : Yes version: 11.0.0 pandas : No Not yet used. Maybe handling of timelines will be reimplemented with it scipy : No Not yet used. Possibly use signal-fitting etc |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] Problems installing swak4Foam in foam-extend-4.0 on Ubuntu 16.04 | jock | OpenFOAM Community Contributions | 12 | September 6, 2019 04:27 |
[OpenFOAM.com] v3.0+ Problems installing on Ubuntu 16.04 | Evander | OpenFOAM Installation | 3 | March 26, 2017 15:47 |
[OpenFOAM.org] Problems installing OF4.1 in Kubuntu 14.04 | Outbound | OpenFOAM Installation | 5 | February 2, 2017 08:54 |
[foam-extend.org] Problems installing foam-extend 3.0 | aylalisa | OpenFOAM Installation | 9 | April 23, 2015 17:17 |
Problems installing CFX on Sun Unix Platform | Haley | CFX | 2 | November 9, 2001 10:52 |