I am not sure what the issue is, but it might be better to build pysparse against a version of python and numpy that is distributed and installed by the package manager for your system. Is there a numpy rpm available?

If for some reason that doesn't work or isn't available, maybe try installing numpy by hand using the system python. You can try different options in a virtualenv if you use that rather than installing into your system directories. Certainly with enthought, it is better to install in a virtualenv rather than messing with the system directories while prototyping.

Googling the actual issue, this may be a 32 versus 64 bit issue.

   <http://stackoverflow.com/questions/648482/a-trivial-python-swig-error-question>

Maybe using a 32 bit distribution on a 64 bit platform is not the way to go (speculation). Is there not a 64 bit dist? Like it says in the link maybe try passing some of the 32 bit flags to gcc.

Hope this helps in some way.

On Thu, Feb 2, 2012 at 11:12 AM, Leland M Barnard <lmbarnard@wisc.edu> wrote:
I'm trying to set up pysparse to run on a 64 bit red hat linux machine
(specifically Rocks v5.2).   We have gcc v4.1.2.  We also have the
Enthought python distribution v7.1-2 (32 bit). with python 2.7.

I'm having trouble installing pysparse v1.1.1.  When I use the command

python setup.py install

I receive this error message:

running install
running build
running build_py
running build_ext
building 'pysparse.spmatrix' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -O2 -fPIC -DNUMPY=1
-DLENFUNC_OK=1 -IInclude
-I/share/apps/Python2.7/epd-7.1-2-rh5-x86/lib/python2.7/site-packages/numpy/core/include
-I/share/apps/Python2.7/epd-7.1-2-rh5-x86/include/python2.7 -c
Src/spmatrixmodule.c -o build/temp.linux-x86_64-2.7/Src/spmatrixmodule.o
In file included from
/share/apps/Python2.7/epd-7.1-2-rh5-x86/include/python2.7/Python.h:58,
                 from Src/spmatrixmodule.c:1:
/share/apps/Python2.7/epd-7.1-2-rh5-x86/include/python2.7/pyport.h:849:2: error:
#error "LONG_BIT definition appears wrong for platform (bad gcc/glibc
config?)."
error: command 'gcc' failed with exit status 1

I was hoping there might be someone else on the mailing list that
encountered this and might have a solution.  Please let me know if there
is any more information I can supply that might be helpful in diagnosing
the trouble.  Thanks!

VTY,
Leland Barnard

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Pysparse-users mailing list
Pysparse-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pysparse-users



--
Daniel Wheeler