Problems with installing PyFoam
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 |
Quote:
|
Thank you Bernhard,
I installed the missing libraries an now it works and I can starting to discover PyFoam! Christoph |
Quote:
|
needs help to find my mistake
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? |
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 |
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? :D Thank you very much Rom |
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 |
Quote:
Amazing piece of software, really thanks Bernhard for simplifying OpenFOAM with PyFoam. |
Quote:
|
Quote:
|
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! |
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 |
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!! |
PyFoam mac displayblockmesh error
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:
|
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/" Best regards, Bruno |
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 |
PyFoam
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! |
Quote:
- Start python and on the Python-Shell try importing it: "import PyQt4" - run pyFoamVersion.py and post the result here |
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: |
All times are GMT -4. The time now is 10:16. |