Ask Your Question
0

python install and fortran

asked 2012-11-07 04:18:23 +0200

Mathieu Dutour Sikiric gravatar image

I want to install the package PyNIO with sage 5.3

The problem occurs with the fortran compiler. When doing

sage --python setup.py install

I get following errors

customize UnixCCompiler

customize UnixCCompiler using build_clib

customize GnuFCompiler

Found executable /srv/gluster/home/mathieu/opt/sage-5.3-linux-64bit-ubuntu_10.04.4_lts-x86_64-Linux/local/bin/gfortran

gnu: no Fortran 90 compiler found

Found executable /usr/bin/ld

Found executable /usr/bin/ar

Found executable /usr/bin/ranlib

gnu: no Fortran 90 compiler found

customize IntelFCompiler

Found executable /opt/intel/composer_xe_2011_sp1/bin/ifort

customize LaheyFCompiler

Could not locate executable lf95

customize PGroupFCompiler

Could not locate executable pgf90

customize AbsoftFCompiler

customize NAGFCompiler

customize VastFCompiler

customize CompaqFCompiler

customize IntelItaniumFCompiler

customize IntelEM64TFCompiler

customize Gnu95FCompiler

customize G95FCompiler

don't know how to compile Fortran code on platform 'posix'

building 'nio' library

error: library nio has Fortran sources but no Fortran compiler found

On the other hand when I try to install on a Python 2.7.3 installed in my home directory using

python setup.py install

there is apparently no error at all:

customize UnixCCompiler

customize UnixCCompiler using build_clib

customize GnuFCompiler

Found executable /opt/intel/composer_xe_2011_sp1/bin/ifort

gnu: no Fortran 90 compiler found

Could not locate executable g77

Could not locate executable f77

gnu: no Fortran 90 compiler found

customize IntelFCompiler

customize LaheyFCompiler

Could not locate executable lf95

customize PGroupFCompiler

Could not locate executable pgfortran

customize AbsoftFCompiler

customize NAGFCompiler

customize VastFCompiler

customize CompaqFCompiler

customize IntelItaniumFCompiler

customize IntelEM64TFCompiler

customize IntelEM64TFCompiler

customize IntelEM64TFCompiler using build_clib

building 'nio' library

compiling C sources

What could explain this difference in behavior between using sage alone and using Python 2.7.3?

Best,

Mathieu

edit retag flag offensive close merge delete

Comments

Try `sage -sh` and then `python setup.py install`. Does that work?

John Palmieri gravatar imageJohn Palmieri ( 2012-11-07 10:14:00 +0200 )edit

(I was going to try this myself, but it seems that you have to register to get the source code, and I don't want to do that.)

John Palmieri gravatar imageJohn Palmieri ( 2012-11-07 13:57:10 +0200 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2012-11-16 15:51:10 +0200

Mathieu Dutour Sikiric gravatar image

Both strategies (sage -sh and the F2CLIBS definition) failed. The problem is in the call to "setup" in "setup.py", where is this function defined?

edit flag offensive delete link more
0

answered 2012-11-07 15:11:03 +0200

updated 2012-11-07 15:12:28 +0200

Maybe the difference is in the Fortran installations in Sage vs. on your computer. If this is the case, maybe the problems can be avoided by setting environment variables correctly: see http://www.pyngl.ucar.edu/Download/bu.... For example, maybe

export F2CLIBS=gfortran
export F2CLIBS_PREFIX=.../path/to/sage/local/lib

will fix it.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-11-07 04:18:23 +0200

Seen: 2,030 times

Last updated: Nov 16 '12