On 4 February, 2014 at 12:04:10 AM, Gavan McGrath (gavan.mcgrath@uwa.edu.au) wrote:
I get the following error when installing. Help appreciated.


pysparse-1.1.1 gavanmcgrath$ python setup.py install
running install
running build
running build_py
creating build
creating build/lib.macosx-10.6-x86_64-2.7
creating build/lib.macosx-10.6-x86_64-2.7/pysparse
copying Lib/__init__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse
copying Lib/__version__.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse
copying Lib/directSolver.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse
copying Lib/itsolvers_util.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse
copying Lib/poisson.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse
copying Lib/poisson_vec.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse
copying Lib/pysparseMatrix.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse
copying Lib/pysparseSuperLU.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse
copying Lib/pysparseUmfpack.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse
copying Lib/sparray.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse
copying Lib/sparseMatrix.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse
copying Lib/spmatrix_util.py -> build/lib.macosx-10.6-x86_64-2.7/pysparse
running build_ext
building 'pysparse.spmatrix' extension
creating build/temp.macosx-10.6-x86_64-2.7
creating build/temp.macosx-10.6-x86_64-2.7/Src
gcc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -DNDEBUG -g -O3 -I/tmp/_py/libraries/usr/local/include -arch x86_64 -DNUMPY=1 -DLENFUNC_OK=1 -IInclude -I/Users/gavanmcgrath/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/core/include -I/Applications/Canopy.app/appdata/canopy-1.3.0.1715.macosx-x86_64/Canopy.app/Contents/include/python2.7 -c Src/spmatrixmodule.c -o build/temp.macosx-10.6-x86_64-2.7/Src/spmatrixmodule.o
gcc: error: x86_64: No such file or directory
gcc: error: x86_64: No such file or directory
gcc: error: unrecognized option ‘-arch’
gcc: error: unrecognized option ‘-arch’
error: command 'gcc' failed with exit status 1


Suggestions?

I built PySparse on my Mac without problems, but I'm not on Mavericks. The compiler flags are managed by Numpy's distutils. Not all versions of gcc support the -arch flag. It seems that gcc-4.2, as installed by Homebrew, does. I would suggest that you either use that version of gcc, or temporarily remove gcc from your PATH so clang is used for compiling PySparse.

Let us know if that works.

-- 
Dominique