[Numpy-discussion] Installing numpy on py 3.1.2 , osx

Vincent Davis vincent at vincentdavis.net
Mon Jun 7 16:02:58 EDT 2010


Going down the prerequisite list I have.

Python 3.1.2 (r312:79360M, Mar 24 2010, 01:33:18)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

>>> nose.__version__
'0.11.0'

I don't really understand the fortran stuff so so I just entered

MacBookPro-new-2:numpy vmd$ python3 setup.py
Converting to Python3 via 2to3...
RefactoringTool: Skipping implicit fixer: buffer
RefactoringTool: Skipping implicit fixer: idioms
RefactoringTool: Skipping implicit fixer: set_literal
RefactoringTool: Skipping implicit fixer: ws_comma
RefactoringTool: Refactored
/Users/vmd/Dropbox/numpy/numpy/build/py3k/numpy/__init__.py
RefactoringTool: Refactored /Users/vmd/Dropbox/numpy/num
.........
Long list

Then I get this

Starting interactive session
------------------------------------------------------------------------

Tasks:
 i       - Show python/platform/machine information
 ie      - Show environment information
 c       - Show C compilers information
 c<name> - Set C compiler (current:None)
 f       - Show Fortran compilers information
 f<name> - Set Fortran compiler (current:None)
 e       - Edit proposed sys.argv[1:].

Task aliases:
 0         - Configure
 1         - Build
 2         - Install
 2<prefix> - Install with prefix.
 3         - Inplace build
 4         - Source distribution
 5         - Binary distribution

Proposed sys.argv = ['setup.py']

Running from numpy source directory.Choose a task (^D to quit, Enter
to continue with setup):

So I try task "f" and get

Running from numpy source directory.Choose a task (^D to quit, Enter
to continue with setup): f
--------------------------------------------------------------------
Fortran compilers found:
Compilers available for this platform, but not found:
 --fcompiler=absoft  Absoft Corp Fortran Compiler
 --fcompiler=g95     G95 Fortran Compiler
 --fcompiler=gnu     GNU Fortran 77 compiler
 --fcompiler=gnu95   GNU Fortran 95 compiler
 --fcompiler=ibm     IBM XL Fortran Compiler
 --fcompiler=intel   Intel Fortran Compiler for 32-bit apps
 --fcompiler=nag     NAGWare Fortran 95 Compiler
Compilers not available on this platform:
 --fcompiler=compaq    Compaq Fortran Compiler
 --fcompiler=hpux      HP Fortran 90 Compiler
 --fcompiler=intele    Intel Fortran Compiler for Itanium apps
 --fcompiler=intelem   Intel Fortran Compiler for EM64T-based apps
 --fcompiler=intelev   Intel Visual Fortran Compiler for Itanium apps
 --fcompiler=intelv    Intel Visual Fortran Compiler for 32-bit apps
 --fcompiler=intelvem  Intel Visual Fortran Compiler for 64-bit apps
 --fcompiler=lahey     Lahey/Fujitsu Fortran 95 Compiler
 --fcompiler=mips      MIPSpro Fortran Compiler
 --fcompiler=none      Fake Fortran compiler
 --fcompiler=pg        Portland Group Fortran Compiler
 --fcompiler=sun       Sun or Forte Fortran 95 Compiler
 --fcompiler=vast      Pacific-Sierra Research Fortran 90 Compiler
For compiler details, run 'config_fc --verbose' setup command.

Which gives me the impression I do not have a fortran compiler. Not
sure which one I should get, any recommendations?

If I type python build I get (See below)

Thanks
Vincent

It seems that it is to much to post soI have clipped it.


/Library/Frameworks/Python.framework/Versions/3.1/include/python3.1/abstract.h:627:
error: syntax error before '*' token
/Library/Frameworks/Python.framework/Versions/3.1/include/python3.1/abstract.h:627:
warning: data definition has no type or storage class
/Library/Frameworks/Python.framework/Versions/3.1/include/python3.1/abstract.h:635:
error: syntax error before '*' token

CLIP

lipo: can't figure out the architecture type of:
/var/folders/2f/2fiXYQSSE+CgAzDQPp9+k++++TI/-Tmp-//ccsi6RLR.out
failure.
removing: _configtest.c _configtest.o
Traceback (most recent call last):
 File "setup.py", line 210, in <module>
   setup_package()
 File "setup.py", line 203, in setup_package
   configuration=configuration )
 File "/Users/vmd/Dropbox/numpy/numpy/build/py3k/numpy/distutils/core.py",
line 186, in setup
   return old_setup(**new_attr)
 File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/distutils/core.py",
line 149, in setup
   dist.run_commands()
 File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/distutils/dist.py",
line 919, in run_commands
   self.run_command(cmd)
 File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/distutils/dist.py",
line 938, in run_command
   cmd_obj.run()
 File "/Users/vmd/Dropbox/numpy/numpy/build/py3k/numpy/distutils/command/build.py",
line 37, in run
   old_build.run(self)
 File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/distutils/command/build.py",
line 128, in run
   self.run_command(cmd_name)
 File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/distutils/cmd.py",
line 315, in run_command
   self.distribution.run_command(command)
 File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/distutils/dist.py",
line 938, in run_command
   cmd_obj.run()
 File "/Users/vmd/Dropbox/numpy/numpy/build/py3k/numpy/distutils/command/build_src.py",
line 152, in run
   self.build_sources()
 File "/Users/vmd/Dropbox/numpy/numpy/build/py3k/numpy/distutils/command/build_src.py",
line 169, in build_sources
   self.build_extension_sources(ext)
 File "/Users/vmd/Dropbox/numpy/numpy/build/py3k/numpy/distutils/command/build_src.py",
line 328, in build_extension_sources
   sources = self.generate_sources(sources, ext)
 File "/Users/vmd/Dropbox/numpy/numpy/build/py3k/numpy/distutils/command/build_src.py",
line 385, in generate_sources
   source = func(extension, build_dir)
 File "numpy/core/setup.py", line 395, in generate_config_h
   moredefs, ignored = cocache.check_types(config_cmd, ext, build_dir)
 File "numpy/core/setup.py", line 41, in check_types
   out = check_types(*a, **kw)
 File "numpy/core/setup.py", line 260, in check_types
   "Cannot compile 'Python.h'. Perhaps you need to "\
SystemError: Cannot compile 'Python.h'. Perhaps you need to install
python-dev|python-devel.



More information about the NumPy-Discussion mailing list