CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

ImportError: No module named PyFoam.RunDictionary.ParsedParameterFile

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 13, 2018, 04:23
Default ImportError: No module named PyFoam.RunDictionary.ParsedParameterFile
  #1
New Member
 
Hans Kurst
Join Date: Feb 2018
Posts: 4
Rep Power: 8
jimswa is on a distinguished road
Hello!

In my OpenFoam case I launched a Python file. In the beginning of the script I want to import the ParsedParameterFile by the command:

from PyFoam.RunDictionary.ParsedParameterFile import ParsedParameterFile


But I always get the error:

ImportError: No module named PyFoam.RunDictionary.ParsedParameterFile

I would be grateful if you could help me!
jimswa is offline   Reply With Quote

Old   November 27, 2018, 12:40
Default
  #2
New Member
 
Marius Bünker
Join Date: Oct 2017
Posts: 13
Rep Power: 9
Blumenkind is on a distinguished road
I had the same problem. Switching the Python Intepreter to my version of Python 2 solved it for me. Can anybody confirm?
On the PyFoam-Wikipage it is written, that Python 3 is generally supported, but only Python 3.4 is tested. Is my version of Python 3 (3.6.7) the problem?

Edit: OK, seems like I just need to set the path for Python3 and try again. Will do tomorrow...


Edit2: PyFoam is installed in the Python 2.7-Folder. If I want to run it with Python3, the path has to be set with the following lines. (It may cause problems, if you have the same dist-packages in python2.7 as in python3)
Code:
import sys
sys.path.append('/usr/local/lib/python2.7/dist-packages'

Last edited by Blumenkind; November 28, 2018 at 04:25.
Blumenkind is offline   Reply With Quote

Reply

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
y+ and u+ values with low-Re RANS turbulence models: utility + testcase florian_krause OpenFOAM 114 August 23, 2023 06:37
Near wall treatment in k-omega SST Arnoldinho OpenFOAM Running, Solving & CFD 38 March 8, 2017 14:48
[OpenFOAM] Native ParaView Reader Bugs tj22 ParaView 270 January 4, 2016 12:39
Problem with compile the setParabolicInlet ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 21:50


All times are GMT -4. The time now is 10:43.