CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[PyFoam] PyFoam Installation Problems

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Search this Thread Display Modes
Old   March 18, 2022, 16:53
Default PyFoam Installation Problems
New Member
Nolan Dyck
Join Date: Dec 2013
Posts: 13
Rep Power: 11
njdyck is on a distinguished road
Hi, I have installed PyFoam version 2021.6 using pip on Ubuntu 20.04.4 LTS.

The only wrinkle I encountered so far was that my system installed the scripts at $HOME/.local/bin instead of /usr/local/bin. I solved this by adding it to my path in ~/.bashrc.

It recognizes OpenFOAM v8 when I run

I copied the tutorial case $FOAM_TUTORIALS/incompressible/icoFoam/cavity/cavity into $HOME, constructed the mesh, and ran icoFoam to confirm the case was setup properly.

Then I executed:
username@DESKTOP-7R3L17E:~/cavity$ --clear --progress --auto auto
Clearing out old timesteps ....
 Warning in /home/username/.local/bin/ : Replacing solver 'auto' with icoFoam in arguments
 PyFoam WARNING on line 37 of file /home/username/.local/lib/python3.8/site-packages/PyFoam/Infrastructure/ : No certficate file /home/username/.pyFoam/foamServerCertificate.cert exists. Therefor no SSL-connection for the FoamServer possible
 To generate a private key:
    openssl genrsa -out /home/username/.pyFoam/foamServerCertificate.key 2048
Then generate the cerificate that is valid for 3 years with
    openssl req -new -x509 -key /home/username/.pyFoam/foamServerCertificate.key -out /home/username/.pyFoam/foamServerCertificate.cert -days 1095
Traceback (most recent call last):
  File "/home/username/.local/bin/", line 5, in <module>
  File "/home/username/.local/lib/python3.8/site-packages/PyFoam/Applications/", line 65, in __init__
  File "/home/username/.local/lib/python3.8/site-packages/PyFoam/Applications/", line 496, in __init__
  File "/home/username/.local/lib/python3.8/site-packages/PyFoam/Applications/", line 122, in run
  File "/home/username/.local/lib/python3.8/site-packages/PyFoam/Execution/", line 197, in __init__
  File "/home/username/.local/lib/python3.8/site-packages/PyFoam/Execution/", line 67, in __init__
  File "/home/username/.local/lib/python3.8/site-packages/PyFoam/Execution/", line 261, in createPlots
  File "/home/username/.local/lib/python3.8/site-packages/PyFoam/Basics/", line 105, in createPlotTimelinesDirect
    return createPlotTimelines(timelines,ci,
  File "/home/username/.local/lib/python3.8/site-packages/PyFoam/Basics/", line 56, in createPlotTimelines
    return lookupTable[implementation](timelines,
  File "/home/username/.local/lib/python3.8/site-packages/PyFoam/Basics/", line 43, in __init__
    Gnuplot.__init__(self, persist=self.spec.persist, quiet=quiet)
  File "/home/username/.local/lib/python3.8/site-packages/PyFoam/ThirdParty/Gnuplot/", line 179, in __init__
    self.gnuplot = gp.GnuplotProcess(persist=persist, quiet=quiet)
  File "/home/username/.local/lib/python3.8/site-packages/PyFoam/ThirdParty/Gnuplot/", line 189, in __init__
    if not test_persist():
  File "/home/username/.local/lib/python3.8/site-packages/PyFoam/ThirdParty/Gnuplot/", line 136, in test_persist
    (not response) or (string.find(response[0], '-persist') == -1))
AttributeError: module 'string' has no attribute 'find'
Exception ignored in: <function GnuplotProcess.__del__ at 0x7fefe30b9430>
Traceback (most recent call last):
  File "/home/username/.local/lib/python3.8/site-packages/PyFoam/ThirdParty/Gnuplot/", line 214, in __del__
  File "/home/username/.local/lib/python3.8/site-packages/PyFoam/ThirdParty/Gnuplot/", line 209, in close
    if self.gnuplot is not None:
AttributeError: 'GnuplotProcess' object has no attribute 'gnuplot'
Exception ignored in: <function Gnuplot.__del__ at 0x7fefc2527af0>
Traceback (most recent call last):
  File "/home/username/.local/lib/python3.8/site-packages/PyFoam/ThirdParty/Gnuplot/", line 200, in __del__
  File "/home/username/.local/lib/python3.8/site-packages/PyFoam/ThirdParty/Gnuplot/", line 195, in close
AttributeError: 'GnuplotTimelines' object has no attribute 'gnuplot'
username@DESKTOP-7R3L17E:~/cavity$ ls
0  Gnuplotting.analyzed  cavity.foam  constant  system
username@DESKTOP-7R3L17E:~/cavity$ vi
Any help would be appreciated!
njdyck is offline   Reply With Quote


openfoam 8, pyfoam installation

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[PyFoam] Problems with installing PyFoam Christoph_84 OpenFOAM Community Contributions 34 October 26, 2021 12:25
[] v1606+ Problems of installation on iMac Intercooled OpenFOAM Installation 4 November 15, 2016 21:22
Problems installing SVN in Ubuntu (for later installing PyFoam for OpenFOAM) immortality Lounge 2 May 24, 2014 04:05
Problems with installation batta31 OpenFOAM Installation 2 September 4, 2012 08:01
installation problems on upgrade from win 3.26 to mic Siemens 5 June 20, 2007 10:40

All times are GMT -4. The time now is 01:00.