|
[Sponsors] |
ImportError: No module named PyFoam.RunDictionary.ParsedParameterFile |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 13, 2018, 04:23 |
ImportError: No module named PyFoam.RunDictionary.ParsedParameterFile
|
#1 |
New Member
Hans Kurst
Join Date: Feb 2018
Posts: 4
Rep Power: 8 |
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! |
|
November 27, 2018, 12:40 |
|
#2 |
New Member
Marius Bünker
Join Date: Oct 2017
Posts: 13
Rep Power: 9 |
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. |
|
|
|
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 |