CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [PyFoam] installation on Ubuntu 12.04 (https://www.cfd-online.com/Forums/openfoam-community-contributions/143308-installation-ubuntu-12-04-a.html)

vaina74 October 21, 2014 08:38

installation on Ubuntu 12.04
 
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?

gschaider October 21, 2014 09:03

Quote:

Originally Posted by vaina74 (Post 515361)
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?

vaina74 October 21, 2014 09:39

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']


gschaider October 22, 2014 14:37

Quote:

Originally Posted by vaina74 (Post 515372)
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 (Post 515372)
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

vaina74 October 23, 2014 03:08

2 Attachment(s)
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...

gschaider October 23, 2014 05:30

Quote:

Originally Posted by vaina74 (Post 515686)
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

alexeym October 23, 2014 05:51

Hi,

Quote:

Originally Posted by vaina74 (Post 515686)
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'

vaina74 October 24, 2014 09:22

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.

vigneshTG January 5, 2015 09:13

ImportError: cannot import name isatty
 
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 ?



gschaider January 7, 2015 15:12

Quote:

Originally Posted by vigneshTG (Post 526158)
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)

vigneshTG January 8, 2015 03:48

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 (Post 526494)
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)


gschaider January 8, 2015 04:46

Quote:

Originally Posted by vigneshTG (Post 526546)
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/

vigneshTG January 8, 2015 07:20

Quote:

Originally Posted by gschaider (Post 526557)
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 !!

zandi July 25, 2015 08:15

Quote:

Originally Posted by gschaider (Post 526557)
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?:confused:

wyldckat July 25, 2015 09:50

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 July 25, 2015 10:53

Quote:

Originally Posted by wyldckat (Post 556940)
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 July 30, 2015 03:47

Quote:

Originally Posted by wyldckat (Post 556940)
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


All times are GMT -4. The time now is 08:37.