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

[PyFoam] installation on Ubuntu 12.04

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 21, 2014, 09:38
Default installation on Ubuntu 12.04
  #1
Senior Member
 
Join Date: Feb 2010
Posts: 213
Rep Power: 17
vaina74 is on a distinguished road
Hi all, today I installed PyFoam on Ubuntu 12.04 but something is wrong and when i run a case I have:
Code:
Traceback (most recent call last):
  File "/home/user-a5/OpenFOAM/PyFoam-0.6.3/bin/pyFoamPlotRunner.py", line 3, in <module>
    from PyFoam.Applications.PlotRunner import PlotRunner
ImportError: No module named PyFoam.Applications.PlotRunner
This is the procedure I used to install PyFoam
Code:
python setup.py install --prefix=$HOME/OpenFOAM/PyFoam-0.6.3
echo "alias PF062='export PYTHONPATH=\$HOME/OpenFOAM/PyFoam/PyFoam-0.6.3/lib/python2.7/site-packages:\$PYTHONPATH; export PATH=\$HOME/OpenFOAM/PyFoam/PyFoam-0.6.3/bin:\$PATH'" >> $HOME/.bashrc
Please, which is the problem?
vaina74 is offline   Reply With Quote

Old   October 21, 2014, 10:03
Default
  #2
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 vaina74 View Post
Hi all, today I installed PyFoam on Ubuntu 12.04 but something is wrong and when i run a case I have:
Code:
Traceback (most recent call last):
  File "/home/user-a5/OpenFOAM/PyFoam-0.6.3/bin/pyFoamPlotRunner.py", line 3, in <module>
    from PyFoam.Applications.PlotRunner import PlotRunner
ImportError: No module named PyFoam.Applications.PlotRunner
This is the procedure I used to install PyFoam
Code:
python setup.py install --prefix=$HOME/OpenFOAM/PyFoam-0.6.3
echo "alias PF062='export PYTHONPATH=\$HOME/OpenFOAM/PyFoam/PyFoam-0.6.3/lib/python2.7/site-packages:\$PYTHONPATH; export PATH=\$HOME/OpenFOAM/PyFoam/PyFoam-0.6.3/bin:\$PATH'" >> $HOME/.bashrc
Please, which is the problem?
Obviously the PYTHONPATH is wrongly set. Is there a directory PyFoam in $HOME/OpenFOAM/PyFoam/PyFoam-0.6.3/lib/python2.7/site-packages ?

Check with pyFoamVersion.py

BTW: it can't be the "in a new shell it works because I modified .bashrc but didn't source it in the original shell" problem?
__________________
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   October 21, 2014, 10:39
Default
  #3
Senior Member
 
Join Date: Feb 2010
Posts: 213
Rep Power: 17
vaina74 is on a distinguished road
Thank you for your quick reply, Bernhard. I obviously sourced the file .bashrc, after the modification :-)
I checked and the directory PyFoam really exists in $HOME/OpenFOAM/PyFoam/PyFoam-0.6.3/lib/python2.7/site-packages. Anyway I post the output of pyFoamVersion.py
Code:
PROBLEM: 
'from PyFoam.ThirdParty.six import print_' did not work. Seems that this is not the correct PyFoam-library
 
Machine info: Linux | naospc-a5 | 3.13.0-37-generic | #64~precise1-Ubuntu SMP Wed Sep 24 21:37:11 UTC 2014 | x86_64 | x86_64 

Python version: 2.7.3 (default, Feb 27 2014, 19:58:35) 
[GCC 4.6.3] 

Python executable: /usr/bin/python 

PYTHONPATH: /home/user-a5/OpenFOAM/PyFoam-0.6.3/lib/python-2.7/site-packages: 

Location of this utility: /home/user-a5/OpenFOAM/PyFoam-0.6.3/bin/pyFoamVersion.py 

PyFoam not in PYTHONPATH or regular search path. Don't see no sense in continuing 
Regular Python search-path: ['/home/user-a5/OpenFOAM/PyFoam-0.6.3/bin', '/home/user-a5/OpenFOAM/PyFoam-0.6.3/lib/python-2.7/site-packages', '/home/user-a5', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PIL', '/usr/lib/python2.7/dist-packages/gst-0.10', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client', '/usr/lib/python2.7/dist-packages/ubuntuone-client', '/usr/lib/python2.7/dist-packages/ubuntuone-control-panel', '/usr/lib/python2.7/dist-packages/ubuntuone-couch', '/usr/lib/python2.7/dist-packages/ubuntuone-installer', '/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol']
vaina74 is offline   Reply With Quote

Old   October 22, 2014, 15:37
Default
  #4
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 vaina74 View Post
Thank you for your quick reply, Bernhard. I obviously sourced the file .bashrc, after the modification :-)
Well. This question solves about 50% of the "mysterious installation problems"

Quote:
Originally Posted by vaina74 View Post
I checked and the directory PyFoam really exists in $HOME/OpenFOAM/PyFoam/PyFoam-0.6.3/lib/python2.7/site-packages. Anyway I post the output of pyFoamVersion.py
Code:
PROBLEM: 
'from PyFoam.ThirdParty.six import print_' did not work. Seems that this is not the correct PyFoam-library
 
Machine info: Linux | naospc-a5 | 3.13.0-37-generic | #64~precise1-Ubuntu SMP Wed Sep 24 21:37:11 UTC 2014 | x86_64 | x86_64 

Python version: 2.7.3 (default, Feb 27 2014, 19:58:35) 
[GCC 4.6.3] 

Python executable: /usr/bin/python 

PYTHONPATH: /home/user-a5/OpenFOAM/PyFoam-0.6.3/lib/python-2.7/site-packages: 

Location of this utility: /home/user-a5/OpenFOAM/PyFoam-0.6.3/bin/pyFoamVersion.py 

PyFoam not in PYTHONPATH or regular search path. Don't see no sense in continuing 
Regular Python search-path: ['/home/user-a5/OpenFOAM/PyFoam-0.6.3/bin', '/home/user-a5/OpenFOAM/PyFoam-0.6.3/lib/python-2.7/site-packages', '/home/user-a5', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PIL', '/usr/lib/python2.7/dist-packages/gst-0.10', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client', '/usr/lib/python2.7/dist-packages/ubuntuone-client', '/usr/lib/python2.7/dist-packages/ubuntuone-control-panel', '/usr/lib/python2.7/dist-packages/ubuntuone-couch', '/usr/lib/python2.7/dist-packages/ubuntuone-installer', '/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol']
Is there a directory
/home/user-a5/OpenFOAM/PyFoam-0.6.3/lib/python-2.7/site-packages/PyFoam
and a file
/home/user-a5/OpenFOAM/PyFoam-0.6.3/lib/python-2.7/site-packages/PyFoam/Applications/PlotRunner.py

If there are not then you either didn't install PyFoam correctly or PYTHONPATH is pointing to the wrong location
__________________
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   October 23, 2014, 04:08
Default
  #5
Senior Member
 
Join Date: Feb 2010
Posts: 213
Rep Power: 17
vaina74 is on a distinguished road
I'm sorry Bernhard, I checked and everything is as expected. About PYTHONPATH, I think it points to the correct folder
Code:
alias pf='export PYTHONPATH=/home/user-a5/OpenFOAM/PyFoam-0.6.3/lib/python-2.7/site-packages:$PYTHONPATH; export PATH=/home/user-a5/OpenFOAM/PyFoam-0.6.3/bin:$PATH'
.
I really don't understand what happens :-(
Maybe other Python versions in my computer disturb PyFoam...
Attached Images
File Type: jpg pic1.jpg (16.1 KB, 33 views)
File Type: jpg pic2.jpg (55.2 KB, 31 views)
vaina74 is offline   Reply With Quote

Old   October 23, 2014, 06:30
Default
  #6
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 vaina74 View Post
I'm sorry Bernhard, I checked and everything is as expected. About PYTHONPATH, I think it points to the correct folder
Code:
alias pf='export PYTHONPATH=/home/user-a5/OpenFOAM/PyFoam-0.6.3/lib/python-2.7/site-packages:$PYTHONPATH; export PATH=/home/user-a5/OpenFOAM/PyFoam-0.6.3/bin:$PATH'
.
I really don't understand what happens :-(
Maybe other Python versions in my computer disturb PyFoam...
Don't think so. With all this lib/python-2.7-stuff python is quite good in separating installations.

The screenshots don't help. The titlebar with the path is unreadable. Plus comparing letter by letter for typos usually doesn't work. The only thing I trust is copying stuff from my config-file. "cd " and paste "<enter>" and see whether I'm in the correct directory
__________________
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   October 23, 2014, 06:51
Default
  #7
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

Quote:
Originally Posted by vaina74 View Post
Code:
alias pf='export PYTHONPATH=/home/user-a5/OpenFOAM/PyFoam-0.6.3/lib/python-2.7/site-packages:$PYTHONPATH; export PATH=/home/user-a5/OpenFOAM/PyFoam-0.6.3/bin:$PATH'
if we assume that your home folder path is correct (though I'd suggest using environment variable $HOME instead of /home/user-a5), final part of the path is wrong, it should be

Code:
lib/python2.7/site-packages
i.e. without minus.

so the alias should be something like

Code:
alias pf='export PYTHONPATH=$HOME/OpenFOAM/PyFoam-0.6.3/lib/python2.7/site-packages:$PYTHONPATH; export PATH=$HOME/OpenFOAM/PyFoam-0.6.3/bin:$PATH'
alexeym is offline   Reply With Quote

Old   October 24, 2014, 10:22
Default
  #8
Senior Member
 
Join Date: Feb 2010
Posts: 213
Rep Power: 17
vaina74 is on a distinguished road
Dear Bernhard and Alexey, the problem was the '-' character. I apologize for having wasted your time, it was really a silly error :-(
As you can see, I've been far away from OpenFOAM and linux stuff for the last two years. Sorry again, have a good day.

PS Thanks for the $HOME tip too.
vaina74 is offline   Reply With Quote

Old   January 5, 2015, 10:13
Default ImportError: cannot import name isatty
  #9
Member
 
Vignesh
Join Date: Oct 2012
Location: Darmstadt, Germany
Posts: 66
Rep Power: 14
vigneshTG is on a distinguished road
Dear All,

Happy New Year Wishes !!

I am using OpenFOAM 2.2.2 and i recently installed pyFoam 0.6.4 (installed it as a root). The installation was successfull but, when i try to use anyone of pyFoam commands say for instance ..
pyFoamChangeBoundaryType.py ... I get an error as shown below

Code:
Traceback (most recent call last):
  File "/usr/local/bin/pyFoamChangeBoundaryName.py", line 3, in <module>
    from PyFoam.Applications.ChangeBoundaryName import ChangeBoundaryName
  File "/usr/local/lib/python2.7/dist-packages/PyFoam/Applications/ChangeBoundaryName.py", line 9, in <module>
    from .PyFoamApplication import PyFoamApplication
  File "/usr/local/lib/python2.7/dist-packages/PyFoam/Applications/PyFoamApplication.py", line 8, in <module>
    from PyFoam.Error import error,warning,FatalErrorPyFoamException,PyFoamException,isatty
ImportError: cannot import name isatty
This is the output i get when i run pyFoamVersion.py
Code:
Machine info: Linux | ws012sla | 3.2.0-61-generic | #93-Ubuntu SMP Fri May 2 21:31:50 UTC 2014 | x86_64 | x86_64

Python version: 2.7.3 (default, Feb 27 2014, 19:58:35) 
[GCC 4.6.3]

Python executable: /usr/bin/python

Python 2.7 is one development platform for PyFoam (along with Python 3)
PYTHONPATH is not set

Location of this utility: /usr/local/bin/pyFoamVersion.py

Version 2.2.2 Fork openfoam of the installed 5 versions:
    extend-3.1 : /home/local/CSI/guru/foam/foam-extend-3.1
openfoam-1.7.1 : /opt/OpenFOAM-1.7.1
  openfoam-171 : /opt/openfoam171
  openfoam-222 : /opt/openfoam222
  openfoam-230 : /opt/openfoam230

pyFoam-Version: 0.6.4
ALERT: Reported version (0, 6, 4) is different from hardcoded version (0, 6, 4, 'development') -> probably inconsistent library installation

Path where PyFoam was found (PyFoam.__path__) is ['/usr/local/lib/python2.7/dist-packages/PyFoam']

Configuration search path: [('file', '/etc/pyFoam/pyfoamrc'), ('directory', '/etc/pyFoam/pyfoamrc.d'), ('file', '/home/local/CSI/guru/.pyFoam/pyfoamrc'), ('directory', '/home/local/CSI/guru/.pyFoam/pyfoamrc.d')]
Configuration files (used): []

Installed libraries:
cython               :  No      Not used. Maybe will by used later to spped up parts of PyFoam 
cProfile             :  Yes 
docutils             :  Yes      version: 0.8.1 
Gnuplot              :  No      Not a problem. Version from ThirdParty is used 
hotshot              :  Yes 
ipdb                 :  No      Not necessary. Only makes debugging more comfortable 
IPython              :  Yes      version: 2.1.0 Matches required version 2.0.0 
matplotlib           :  Yes      version: 1.1.1rc 
mercurial            :  Yes      version: 2.0.2 
nose                 :  No      Only needed for running the unit-tests (developers only) 
numpy                :  Yes      version: 1.6.1 
openpyxl             :  No      Not a problem. Only used for exporting pandas-data to Excel-files (advanced) 
pandas               :  No      Not a problem. Only used for handling of advanced data-handling 
ply                  :  No      Not a problem. Version from ThirdParty is used 
profile              :  Yes 
psyco                :  No      Not a problem. Acceleration not possible 
PyQt4                :  Yes      version: 4.8.1 
PyQt4.Qwt5           :  No      Only an alternate plotting back-end 
scipy                :  Yes      version: 0.9.0 
Tkinter              :  Yes      version: $Revision: 81008 $ 
twisted              :  Yes      version: 11.1.0 
vtk                  :  Yes      version: 5.8.0 
xlwt                 :  No      Not a problem. Only used for exporting pandas-data to Excel-files 
xlrd                 :  No      Not a problem. Only used for importing Excel-files to pandas-data 

Library locations
cProfile             : /usr/lib/python2.7/cProfile.pyc
docutils             : /usr/lib/python2.7/dist-packages/docutils/__init__.pyc
hotshot              : /usr/lib/python2.7/hotshot/__init__.pyc
IPython              : /usr/local/lib/python2.7/dist-packages/IPython/__init__.pyc
matplotlib           : /usr/lib/pymodules/python2.7/matplotlib/__init__.pyc
mercurial            : /usr/lib/python2.7/dist-packages/mercurial/__init__.pyc
numpy                : /usr/lib/python2.7/dist-packages/numpy/__init__.pyc
profile              : /usr/lib/python2.7/profile.pyc
PyQt4                : /usr/lib/python2.7/dist-packages/PyQt4/__init__.pyc
scipy                : /usr/lib/python2.7/dist-packages/scipy/__init__.pyc
Tkinter              : /usr/lib/python2.7/lib-tk/Tkinter.pyc
twisted              : /usr/lib/python2.7/dist-packages/twisted/__init__.pyc
vtk                  : /usr/lib/pymodules/python2.7/vtk/__init__.pyc

Checking additional envirnoment variables

Checking for PYFOAM_DIR : Location of the PyFoam-installation. Not strictly necessary
PYFOAM_DIR missing from environment

Checking for PYFOAM_SITE_DIR : Location of non-PyFoam-disctributions script. Set and used by some Foam-distributions
PYFOAM_SITE_DIR missing from environment
Can someone tell me how to rectify this error ?


__________________
Thanks and Regards

Vignesh
vigneshTG is offline   Reply With Quote

Old   January 7, 2015, 16:12
Default
  #10
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
Dear All,

Happy New Year Wishes !!

I am using OpenFOAM 2.2.2 and i recently installed pyFoam 0.6.4 (installed it as a root). The installation was successfull but, when i try to use anyone of pyFoam commands say for instance ..
pyFoamChangeBoundaryType.py ... I get an error as shown below

Code:
Traceback (most recent call last):
  File "/usr/local/bin/pyFoamChangeBoundaryName.py", line 3, in <module>
    from PyFoam.Applications.ChangeBoundaryName import ChangeBoundaryName
  File "/usr/local/lib/python2.7/dist-packages/PyFoam/Applications/ChangeBoundaryName.py", line 9, in <module>
    from .PyFoamApplication import PyFoamApplication
  File "/usr/local/lib/python2.7/dist-packages/PyFoam/Applications/PyFoamApplication.py", line 8, in <module>
    from PyFoam.Error import error,warning,FatalErrorPyFoamException,PyFoamException,isatty
ImportError: cannot import name isatty
This is the output i get when i run pyFoamVersion.py
Code:
Machine info: Linux | ws012sla | 3.2.0-61-generic | #93-Ubuntu SMP Fri May 2 21:31:50 UTC 2014 | x86_64 | x86_64

Python version: 2.7.3 (default, Feb 27 2014, 19:58:35) 
[GCC 4.6.3]

Python executable: /usr/bin/python

Python 2.7 is one development platform for PyFoam (along with Python 3)
PYTHONPATH is not set

Location of this utility: /usr/local/bin/pyFoamVersion.py

Version 2.2.2 Fork openfoam of the installed 5 versions:
    extend-3.1 : /home/local/CSI/guru/foam/foam-extend-3.1
openfoam-1.7.1 : /opt/OpenFOAM-1.7.1
  openfoam-171 : /opt/openfoam171
  openfoam-222 : /opt/openfoam222
  openfoam-230 : /opt/openfoam230

pyFoam-Version: 0.6.4
ALERT: Reported version (0, 6, 4) is different from hardcoded version (0, 6, 4, 'development') -> probably inconsistent library installation

Path where PyFoam was found (PyFoam.__path__) is ['/usr/local/lib/python2.7/dist-packages/PyFoam']

Configuration search path: [('file', '/etc/pyFoam/pyfoamrc'), ('directory', '/etc/pyFoam/pyfoamrc.d'), ('file', '/home/local/CSI/guru/.pyFoam/pyfoamrc'), ('directory', '/home/local/CSI/guru/.pyFoam/pyfoamrc.d')]
Configuration files (used): []

Installed libraries:
cython               :  No      Not used. Maybe will by used later to spped up parts of PyFoam 
cProfile             :  Yes 
docutils             :  Yes      version: 0.8.1 
Gnuplot              :  No      Not a problem. Version from ThirdParty is used 
hotshot              :  Yes 
ipdb                 :  No      Not necessary. Only makes debugging more comfortable 
IPython              :  Yes      version: 2.1.0 Matches required version 2.0.0 
matplotlib           :  Yes      version: 1.1.1rc 
mercurial            :  Yes      version: 2.0.2 
nose                 :  No      Only needed for running the unit-tests (developers only) 
numpy                :  Yes      version: 1.6.1 
openpyxl             :  No      Not a problem. Only used for exporting pandas-data to Excel-files (advanced) 
pandas               :  No      Not a problem. Only used for handling of advanced data-handling 
ply                  :  No      Not a problem. Version from ThirdParty is used 
profile              :  Yes 
psyco                :  No      Not a problem. Acceleration not possible 
PyQt4                :  Yes      version: 4.8.1 
PyQt4.Qwt5           :  No      Only an alternate plotting back-end 
scipy                :  Yes      version: 0.9.0 
Tkinter              :  Yes      version: $Revision: 81008 $ 
twisted              :  Yes      version: 11.1.0 
vtk                  :  Yes      version: 5.8.0 
xlwt                 :  No      Not a problem. Only used for exporting pandas-data to Excel-files 
xlrd                 :  No      Not a problem. Only used for importing Excel-files to pandas-data 

Library locations
cProfile             : /usr/lib/python2.7/cProfile.pyc
docutils             : /usr/lib/python2.7/dist-packages/docutils/__init__.pyc
hotshot              : /usr/lib/python2.7/hotshot/__init__.pyc
IPython              : /usr/local/lib/python2.7/dist-packages/IPython/__init__.pyc
matplotlib           : /usr/lib/pymodules/python2.7/matplotlib/__init__.pyc
mercurial            : /usr/lib/python2.7/dist-packages/mercurial/__init__.pyc
numpy                : /usr/lib/python2.7/dist-packages/numpy/__init__.pyc
profile              : /usr/lib/python2.7/profile.pyc
PyQt4                : /usr/lib/python2.7/dist-packages/PyQt4/__init__.pyc
scipy                : /usr/lib/python2.7/dist-packages/scipy/__init__.pyc
Tkinter              : /usr/lib/python2.7/lib-tk/Tkinter.pyc
twisted              : /usr/lib/python2.7/dist-packages/twisted/__init__.pyc
vtk                  : /usr/lib/pymodules/python2.7/vtk/__init__.pyc

Checking additional envirnoment variables

Checking for PYFOAM_DIR : Location of the PyFoam-installation. Not strictly necessary
PYFOAM_DIR missing from environment

Checking for PYFOAM_SITE_DIR : Location of non-PyFoam-disctributions script. Set and used by some Foam-distributions
PYFOAM_SITE_DIR missing from environment
Can someone tell me how to rectify this error ?


That is strange. The function isatty should be defined right near the top of
/usr/local/lib/python2.7/dist-packages/PyFoam/Error.py

That is a completely fresh installation or did you upgrade from an old PyFoam installation? (but it must be really ancient because isatty is there for years)
__________________
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   January 8, 2015, 04:48
Default
  #11
Member
 
Vignesh
Join Date: Oct 2012
Location: Darmstadt, Germany
Posts: 66
Rep Power: 14
vigneshTG is on a distinguished road
Dear Bernhard Gschaider !

Thanks for your response !! I did a fresh installation of pyFoam 0.6.4... Is there any way to uninstall pyfoam ? I would like to reinstall it and try one more time...

Quote:
Originally Posted by gschaider View Post
That is strange. The function isatty should be defined right near the top of
/usr/local/lib/python2.7/dist-packages/PyFoam/Error.py

That is a completely fresh installation or did you upgrade from an old PyFoam installation? (but it must be really ancient because isatty is there for years)
__________________
Thanks and Regards

Vignesh

Last edited by vigneshTG; January 9, 2015 at 04:21.
vigneshTG is offline   Reply With Quote

Old   January 8, 2015, 05:46
Default
  #12
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
Dear Bruno !

Thanks for your response !! I did a fresh installation of pyFoam 0.6.4... Is there any way to uninstall pyfoam ? I would like to reinstall it and try one more time...
You installed with setup.py, right? I'm afraid: no (http://stackoverflow.com/questions/1...p-py-uninstall)

You should be fine if you removed all files starting with pyFoam from /usr/local/bin and the whole directory /usr/local/lib/python2.7/dist-packages/PyFoam/
__________________
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   January 8, 2015, 08:20
Default
  #13
Member
 
Vignesh
Join Date: Oct 2012
Location: Darmstadt, Germany
Posts: 66
Rep Power: 14
vigneshTG is on a distinguished road
Quote:
Originally Posted by gschaider View Post
You installed with setup.py, right? I'm afraid: no (http://stackoverflow.com/questions/1...p-py-uninstall)

You should be fine if you removed all files starting with pyFoam from /usr/local/bin and the whole directory /usr/local/lib/python2.7/dist-packages/PyFoam/
Dear Bernhard Gschaider,

Thanks for the tip, I removed the files as you adviced and reinstalled pyFoam. Now everything works.

Thank you very much !!
__________________
Thanks and Regards

Vignesh

Last edited by vigneshTG; January 9, 2015 at 04:21.
vigneshTG is offline   Reply With Quote

Old   July 25, 2015, 09:15
Unhappy
  #14
Senior Member
 
zandi's Avatar
 
Fatema Zandi Goharrizi
Join Date: Mar 2009
Posts: 158
Rep Power: 17
zandi is on a distinguished road
Quote:
Originally Posted by gschaider View Post
You installed with setup.py, right? I'm afraid: no (http://stackoverflow.com/questions/1...p-py-uninstall)

You should be fine if you removed all files starting with pyFoam from /usr/local/bin and the whole directory /usr/local/lib/python2.7/dist-packages/PyFoam/

Hello friend
I appreciate if you cold help me
I go for install PyFoam
I unrar file got from you said with tar command
then go to folder and then type the command came in wiki
this is the error: for first command:



Code:
fatema@fatema-2PC:~/PyFoam-0.6.5$ sudo python setup.py install
[sudo] password for fatema: 
Traceback (most recent call last):
  File "setup.py", line 1, in <module>
    from setuptools import setup
ImportError: No module named setuptools
and the second command offered by wiki:

Code:
fatema@fatema-2PC:~/PyFoam-0.6.5$ sudo apt-get install python-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libexpat1-dev libssl-dev libssl-doc python2.7-dev
The following NEW packages will be installed:
  libexpat1-dev libssl-dev libssl-doc python-dev python2.7-dev
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 32.1 MB/32.4 MB of archives.
After this operation, 48.0 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
WARNING: The following packages cannot be authenticated!
  libexpat1-dev libssl-dev libssl-doc python2.7-dev python-dev
Install these packages without verification [y/N]? y                    
Err http://ir.archive.ubuntu.com/ubuntu/ precise-updates/main libssl-dev amd64 1.0.1-4ubuntu5.20
  404  Not Found
Err http://security.ubuntu.com/ubuntu/ precise-security/main libssl-dev amd64 1.0.1-4ubuntu5.20
  404  Not Found [IP: 91.189.91.23 80]
Err http://security.ubuntu.com/ubuntu/ precise-security/main libssl-doc all 1.0.1-4ubuntu5.20
  404  Not Found [IP: 91.189.91.23 80]
Err http://security.ubuntu.com/ubuntu/ precise-security/main python2.7-dev amd64 2.7.3-0ubuntu3.5
  404  Not Found [IP: 91.189.91.23 80]
Failed to fetch http://security.ubuntu.com/ubuntu/po...5.20_amd64.deb  404  Not Found [IP: 91.189.91.23 80]
Failed to fetch http://security.ubuntu.com/ubuntu/po...tu5.20_all.deb  404  Not Found [IP: 91.189.91.23 80]
Failed to fetch http://security.ubuntu.com/ubuntu/po...u3.5_amd64.deb  404  Not Found [IP: 91.189.91.23 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
could you help me with that please?

Last edited by wyldckat; July 25, 2015 at 10:49. Reason: Added [CODE][/CODE] markers
zandi is offline   Reply With Quote

Old   July 25, 2015, 10:50
Default
  #15
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer: You need to update the package list first:
Code:
sudo apt-get update
Then you can try installing the package:
Code:
sudo apt-get install python-dev
zandi likes this.
wyldckat is offline   Reply With Quote

Old   July 25, 2015, 11:53
Default
  #16
Senior Member
 
zandi's Avatar
 
Fatema Zandi Goharrizi
Join Date: Mar 2009
Posts: 158
Rep Power: 17
zandi is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Quick answer: You need to update the package list first:
Code:
sudo apt-get update
Then you can try installing the package:
Code:
sudo apt-get install python-dev
Thank you very much
zandi is offline   Reply With Quote

Old   July 30, 2015, 04:47
Default
  #17
Senior Member
 
zandi's Avatar
 
Fatema Zandi Goharrizi
Join Date: Mar 2009
Posts: 158
Rep Power: 17
zandi is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Quick answer: You need to update the package list first:
Code:
sudo apt-get update
Then you can try installing the package:
Code:
sudo apt-get install python-dev

Thank you again
but after doing the installation and enter the checking command

Code:
To test whether the installation of PyFoam is working start the interactive Python shell with 
   python (The shell can be left with Control-D). In that shell type 
   import PyFoam import PyFoam.FoamInformation print PyFoam.FoamInformation.foamTutorials() If the last command produces an output similar to 
   /home/nonroot/OpenFOAM/OpenFOAM-1.2-devel/tutorials everything is well.
I didn't get the output
how I can know it works fine?

Thank you
zandi 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
[swak4Foam] Swak4foam installation error with OF 2.2.0 (Ubuntu 12.04 LTS) vbchris OpenFOAM Community Contributions 8 March 25, 2021 21:11
FLUENT installation on UBUNTU 12.04 (LTS) teymourj FLUENT 2 March 1, 2017 23:24
[OpenFOAM.org] OpenFOAM 2.40 installation on Ubuntu 12.04 LTS eddykendo OpenFOAM Installation 1 July 18, 2015 18:38
Trouble shooting about OpenFOAM installation in Ubuntu 12.04 Nait OpenFOAM Installation 2 December 12, 2012 11:20
Openfoam 2.1 installation in ubuntu 12.04 jsm OpenFOAM Installation 11 May 7, 2012 05:56


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