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

[PyFoam] pyFoamVersion.py "NameError: name 'pyFoamVersion' is not defined"

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 16, 2013, 05:25
Default pyFoamVersion.py "NameError: name 'pyFoamVersion' is not defined"
  #1
New Member
 
pratap
Join Date: Nov 2013
Posts: 21
Rep Power: 13
cfdsat is on a distinguished road
I have installed PyFoam on my machine which has python 2.4 using the following command
python setup.py install --prefix=/home/nonroot/my_python

Included the below in my .bashrc file
export PYTHONPATH=/home/nonroot/my_python/lib/python-2.3/site-packages:$PYTHONPATH

export PATH=/home/nonroot/my_python/bin:$PATH
checked pyFoam installations by issuing the following commands
import PyFoam
import PyFoam.FoamInformation
print PyFoam.FoamInformation.foamTutorials()

But still pyFoamVersion.py command gives me the following

Traceback (most recent call last):
File "<stdin>", line 1, in ?
NameError: name 'pyFoamVersion' is not defined

Please let me know what is missing.
cfdsat is offline   Reply With Quote

Old   June 6, 2014, 20:48
Default
  #2
Member
 
Vignesh
Join Date: Oct 2012
Location: Darmstadt, Germany
Posts: 66
Rep Power: 14
vigneshTG is on a distinguished road
After PyFoam installation, I typed the three commands given in the installation webpage given below
import PyFoam
import PyFoam.FoamInformation
print PyFoam.FoamInformation.foamTutorials()

I get a blank message instead of the message (/home/nonroot/OpenFOAM/OpenFOAM-1.2-devel/tutorials) given in the webpage

Can someone help ??


Thanks and Regards
Vignesh TG
vigneshTG is offline   Reply With Quote

Old   June 7, 2014, 07:59
Default
  #3
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by vigneshTG View Post
After PyFoam installation, I typed the three commands given in the installation webpage given below
import PyFoam
import PyFoam.FoamInformation
print PyFoam.FoamInformation.foamTutorials()

I get a blank message instead of the message (/home/nonroot/OpenFOAM/OpenFOAM-1.2-devel/tutorials) given in the webpage

Can someone help ??


Thanks and Regards
Vignesh TG
Probably no OF-version is initialized on that shell (environment variable FOAM_TUTORIALS is not set). Then this is the correct behaviour

Try pyFoamVersion.py for more info
__________________
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
gschaider is offline   Reply With Quote

Old   June 7, 2014, 15:57
Default
  #4
Member
 
Vignesh
Join Date: Oct 2012
Location: Darmstadt, Germany
Posts: 66
Rep Power: 14
vigneshTG is on a distinguished road
Thank you for the quick reply Gschaider !!

Now it works


Regards
Vignesh TG
vigneshTG is offline   Reply With Quote

Reply


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
[ICEM] How can I define different zones in ICEM? llrr ANSYS Meshing & Geometry 14 February 12, 2017 14:44
UDF link fortran source yorelchr Fluent UDF and Scheme Programming 0 February 7, 2013 04:44
using METIS functions in fortran dokeun Main CFD Forum 7 January 29, 2013 05:06
OpenFOAM static build on Cray XT5 asaijo OpenFOAM Installation 9 April 6, 2011 13:21
OpenFOAM13 for Mac OSX Darwin 104 hjasak OpenFOAM Installation 70 September 24, 2010 06:06


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