LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Help installing pygame (http://www.linuxquestions.org/questions/linux-software-2/help-installing-pygame-173341/)

Mike2001 04-22-2004 11:49 AM

Help installing pygame
 
Can anyone figure out whats wrong here. I am installing pygame on Mandrake 9.2. When I run ./setup.py it starts then errs here:

No Arguments Given, Perform Default Install? [Y/n]y
running install
running build
running build_py
running build_ext
building 'pygame.surfarray' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -fomit-frame-pointer -pipe -march=i586 -mcpu=pentiumpro -g -fPIC -D_REENTRANT -I/usr/local/include/SDL -I/usr/include/python2.3 -c src/surfarray.c -o build/temp.linux-i686-2.3/src/surfarray.o
src/surfarray.c:24:32: Numeric/arrayobject.h: No such file or directory
src/surfarray.c: In function `pixels3d':
src/surfarray.c:92: error: `PyArray_UBYTE' undeclared (first use in this function)
src/surfarray.c:92: error: (Each undeclared identifier is reported only once
src/surfarray.c:92: error: for each function it appears in.)
src/surfarray.c:92: warning: assignment makes pointer from integer without a cast
src/surfarray.c:95: error: `PyArrayObject' undeclared (first use in this function)
src/surfarray.c:95: error: syntax error before ')' token
src/surfarray.c:95: error: `OWN_DIMENSIONS' undeclared (first use in this function)
src/surfarray.c:95: error: `OWN_STRIDES' undeclared (first use in this function)
src/surfarray.c:95: error: `SAVESPACE' undeclared (first use in this function)
src/surfarray.c:96: error: syntax error before ')' token
src/surfarray.c:97: error: syntax error before ')' token
src/surfarray.c:98: error: syntax error before ')' token
src/surfarray.c:99: error: syntax error before ')' token
src/surfarray.c: In function `pixels2d':
src/surfarray.c:126: error: `PyArray_UBYTE' undeclared (first use in this function)
src/surfarray.c:126: error: `PyArray_SHORT' undeclared (first use in this function)
src/surfarray.c:126: error: `PyArray_INT' undeclared (first use in this function)
src/surfarray.c:147: warning: assignment makes pointer from integer without a cast
src/surfarray.c:150: error: `PyArrayObject' undeclared (first use in this function)
src/surfarray.c:150: error: syntax error before ')' token
src/surfarray.c:151: error: syntax error before ')' token
src/surfarray.c:152: error: syntax error before ')' token
src/surfarray.c:152: error: `OWN_DIMENSIONS' undeclared (first use in this function)
src/surfarray.c:152: error: `OWN_STRIDES' undeclared (first use in this function)
src/surfarray.c:153: error: syntax error before ')' token
src/surfarray.c: In function `pixels_alpha':
src/surfarray.c:203: error: `PyArray_UBYTE' undeclared (first use in this function)
src/surfarray.c:203: warning: assignment makes pointer from integer without a cast
src/surfarray.c:206: error: `PyArrayObject' undeclared (first use in this function)
src/surfarray.c:206: error: syntax error before ')' token
src/surfarray.c:207: error: syntax error before ')' token
src/surfarray.c:208: error: syntax error before ')' token
src/surfarray.c:208: error: `OWN_DIMENSIONS' undeclared (first use in this function)
src/surfarray.c:208: error: `OWN_STRIDES' undeclared (first use in this function)
src/surfarray.c:209: error: syntax error before ')' token
src/surfarray.c: In function `array2d':
src/surfarray.c:243: error: `PyArray_INT' undeclared (first use in this function)
src/surfarray.c:243: warning: assignment makes pointer from integer without a cast
src/surfarray.c:246: error: `PyArrayObject' undeclared (first use in this function)
src/surfarray.c:246: error: syntax error before ')' token
src/surfarray.c:247: error: syntax error before ')' token
src/surfarray.c:258: error: syntax error before ')' token
src/surfarray.c:270: error: syntax error before ')' token
src/surfarray.c:282: error: syntax error before ')' token
src/surfarray.c:299: error: syntax error before ')' token
src/surfarray.c: In function `array3d':
src/surfarray.c:351: error: `PyArray_UBYTE' undeclared (first use in this function)
src/surfarray.c:351: warning: assignment makes pointer from integer without a cast
src/surfarray.c:354: error: `PyArrayObject' undeclared (first use in this function)
src/surfarray.c:354: error: syntax error before ')' token
src/surfarray.c:355: error: syntax error before ')' token
src/surfarray.c:372: error: syntax error before ')' token
src/surfarray.c:387: error: syntax error before ')' token
src/surfarray.c:402: error: syntax error before ')' token
src/surfarray.c:421: error: syntax error before ')' token
src/surfarray.c: In function `array_alpha':
src/surfarray.c:472: error: `PyArray_UBYTE' undeclared (first use in this function)
src/surfarray.c:472: warning: assignment makes pointer from integer without a cast
src/surfarray.c:481: error: `PyArrayObject' undeclared (first use in this function)
src/surfarray.c:481: error: syntax error before ')' token
src/surfarray.c:481: error: syntax error before ')' token
src/surfarray.c:481: error: syntax error before ')' token
src/surfarray.c:481: error: syntax error before ')' token
src/surfarray.c:485: error: syntax error before ')' token
src/surfarray.c:486: error: syntax error before ')' token
src/surfarray.c:497: error: syntax error before ')' token
src/surfarray.c:510: error: syntax error before ')' token
src/surfarray.c:528: error: syntax error before ')' token
src/surfarray.c: In function `array_colorkey':
src/surfarray.c:575: error: `PyArray_UBYTE' undeclared (first use in this function)
src/surfarray.c:575: warning: assignment makes pointer from integer without a cast
src/surfarray.c:581: error: `PyArrayObject' undeclared (first use in this function)
src/surfarray.c:581: error: syntax error before ')' token
src/surfarray.c:581: error: syntax error before ')' token
src/surfarray.c:581: error: syntax error before ')' token
src/surfarray.c:581: error: syntax error before ')' token
src/surfarray.c:585: error: syntax error before ')' token
src/surfarray.c:586: error: syntax error before ')' token
src/surfarray.c:597: error: syntax error before ')' token
src/surfarray.c:610: error: syntax error before ')' token
src/surfarray.c:623: error: syntax error before ')' token
src/surfarray.c:641: error: syntax error before ')' token
src/surfarray.c: In function `map_array':
src/surfarray.c:676: error: `PyArrayObject' undeclared (first use in this function)
src/surfarray.c:676: error: `array' undeclared (first use in this function)
src/surfarray.c:681: error: `PyArray_Type' undeclared (first use in this function)
src/surfarray.c:685: error: syntax error before ')' token
src/surfarray.c:698: error: `PyArray_INT' undeclared (first use in this function)
src/surfarray.c:698: warning: assignment makes pointer from integer without a cast
src/surfarray.c:700: error: syntax error before ')' token
src/surfarray.c:709: warning: assignment makes pointer from integer without a cast
src/surfarray.c:711: error: syntax error before ')' token
src/surfarray.c:721: warning: assignment makes pointer from integer without a cast
src/surfarray.c:723: error: syntax error before ')' token
src/surfarray.c: In function `blit_array':
src/surfarray.c:982: error: `PyArrayObject' undeclared (first use in this function)
src/surfarray.c:982: error: `array' undeclared (first use in this function)
src/surfarray.c:987: error: `PyArray_Type' undeclared (first use in this function)
src/surfarray.c:991: error: syntax error before ')' token
src/surfarray.c: In function `make_surface':
src/surfarray.c:1114: error: `PyArrayObject' undeclared (first use in this function)
src/surfarray.c:1114: error: `array' undeclared (first use in this function)
src/surfarray.c:1118: error: `PyArray_Type' undeclared (first use in this function)
src/surfarray.c:1120: error: syntax error before ')' token
src/surfarray.c:1124: error: `PyArray_LONG' undeclared (first use in this function)
error: command 'gcc' failed with exit status 1

ssokolow 09-11-2004 07:12 PM

Install Numeric. If you're on an RPM-based distro and you've installed it, then you forgot to also install the -devel package.

I ran into the same problem on Mandrake 10 while recompiling to enable mp3 support. (The only Mandrake RPMs I found didn't have it enabled and I like to play PyDance using mp3s)

You can get the source tarball from http://www.pfdubois.com/numpy/

If you want RPMs, I recommend http://rpm.pbone.net/
I've found that these ones work nicely on Mandrake 10.0:
- python-numeric-23.1-2mdk.src.rpm
- python-numeric-devel-23.1-2mdk.i586.rpm


All times are GMT -5. The time now is 10:09 PM.