[SciPy-User] build scipy on osx lion : KeyError: 'FARCHFLAGS'

Samuel John scipy at samueljohn.de
Thu Sep 29 04:44:44 EDT 2011


Hi,

perhaps you need the "right" gfortran compiler. I am not sure because you have /usr/bin/gfortran.

I find it most easy to get via http://mxcl.github.com/homebrew/ .
Do:
/usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"
then do:
brew install gfortran

Then try your build again. For me this works great on Lion.
Does this help you?

--
Samuel


On 28.09.2011, at 19:11, massimo di stefano wrote:

> hi All
> i just switched to osx lion .. tring to build scipy
> i'm having this error :  
> 
> http://paste.pound-python.org/show/13120/ 
> 
> ###
> 
> Could not locate executable ifc
> customize GnuFCompiler
> Could not locate executable g77
> customize Gnu95FCompiler
> Found executable /usr/bin/gfortran
> Traceback (most recent call last):
>   File "setup.py", line 196, in <module>
>     setup_package()
>   File "setup.py", line 187, in setup_package
>     configuration=configuration )
>   File "/Library/Python/2.7/site-packages/numpy-override/numpy/distutils/core.py", line 186, in setup
>     return old_setup(**new_attr)
>   File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 152, in setup
>     dist.run_commands()
>   File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
>     self.run_command(cmd)
>   File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
>     cmd_obj.run()
>   File "/Library/Python/2.7/site-packages/numpy-override/numpy/distutils/command/build.py", line 37, in run
>     old_build.run(self)
>   File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build.py", line 127, in run
>     self.run_command(cmd_name)
>   File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
>     self.distribution.run_command(command)
>   File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
>     cmd_obj.run()
>   File "/Library/Python/2.7/site-packages/numpy-override/numpy/distutils/command/build_clib.py", line 89, in run
>     c_compiler=self.compiler)
>   File "/Library/Python/2.7/site-packages/numpy-override/numpy/distutils/fcompiler/__init__.py", line 821, in new_fcompiler
>     c_compiler=c_compiler)
>   File "/Library/Python/2.7/site-packages/numpy-override/numpy/distutils/fcompiler/__init__.py", line 803, in get_default_fcompiler
>     c_compiler=c_compiler)
>   File "/Library/Python/2.7/site-packages/numpy-override/numpy/distutils/fcompiler/__init__.py", line 752, in _find_existing_fcompiler
>     c.customize(dist)
>   File "/Library/Python/2.7/site-packages/numpy-override/numpy/distutils/fcompiler/__init__.py", line 502, in customize
>     fflags = self.flag_vars.flags + dflags + oflags + aflags
>   File "/Library/Python/2.7/site-packages/numpy-override/numpy/distutils/environment.py", line 37, in __getattr__
>     return self._get_var(name, conf_desc)
>   File "/Library/Python/2.7/site-packages/numpy-override/numpy/distutils/environment.py", line 51, in _get_var
>     var = self._hook_handler(name, hook)
>   File "/Library/Python/2.7/site-packages/numpy-override/numpy/distutils/fcompiler/__init__.py", line 676, in _environment_hook
>     return hook()
>   File "/Library/Python/2.7/site-packages/numpy-override/numpy/distutils/fcompiler/gnu.py", line 285, in get_flags
>     arch_flags = self._universal_flags(self.compiler_f90)
>   File "/Library/Python/2.7/site-packages/numpy-override/numpy/distutils/fcompiler/gnu.py", line 274, in _universal_flags
>     farchflags = os.environ['FARCHFLAGS']
>   File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/UserDict.py", line 23, in __getitem__
>     raise KeyError(key)
> KeyError: 'FARCHFLAGS'
> 
> ###
> 
> have you any clue on how to fix it ?
> 
> i used "setup.py build" as build system
> trying with scons i received the same error.
> 
> 
> i used this instruction :
> 
> # clone scipy from git repository
> # cd into scipy
> 
> export CC=gcc-4.2
> export CXX=g++-4.2
> export FFLAGS=-ff2c
> 
> python setup.py build
> 
> 
> 
> dyn-128-128-201-211:scipy epifanio$ which gfortran
> /usr/bin/gfortran
> 
> dyn-128-128-201-211:scipy epifanio$ file /usr/bin/gfortran
> /usr/bin/gfortran: Mach-O universal binary with 2 architectures
> /usr/bin/gfortran (for architecture i386):	Mach-O executable i386
> /usr/bin/gfortran (for architecture x86_64):	Mach-O 64-bit executable x86_64
> 
> dyn-128-128-201-211:scipy epifanio$ which python
> /Library/Frameworks/Python.framework/Versions/2.7/bin/python
> 
> dyn-128-128-201-211:scipy epifanio$ file /Library/Frameworks/Python.framework/Versions/2.7/bin/python
> /Library/Frameworks/Python.framework/Versions/2.7/bin/python: Mach-O universal binary with 2 architectures
> /Library/Frameworks/Python.framework/Versions/2.7/bin/python (for architecture i386):	Mach-O executable i386
> /Library/Frameworks/Python.framework/Versions/2.7/bin/python (for architecture x86_64):	Mach-O 64-bit executable x86_64
> 
> 
> Many thanks for any help!
> 
> --Massimo.
> 
> 
> 
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user




More information about the SciPy-User mailing list