[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] pygame- Installing pygame on suse linux from source



Richard is right if you want to run your program from the commandline by typing

./example.py

but if so you also need to set the executable bit by running

chmod u+x example.py

(read "change the mode to add eXecutable permissions for the current User on example.py). On linux when you run a non-executable program as an executable, the shell reads the first line if it starts with #! and then runs that with the file as input.

The other way you can run it is by simply typing

python example.py

Then you don't need to specify the permission bits or add the #! line.

--Mike

Richard Goedeken wrote:
Jason,

In order to make python scripts executable, put a line like this at the
top of the file:

#!/usr/bin/env python

You can also call it directly, like this:

#!/usr/bin/python

For your sdl-dev problem, run 'sdl-config --cflags' from the command
line.  There should be an option printed which says '-I/usr/include/SDL'
 though the path may be slightly different.  Try to see if the header
file is there by doing an 'ls -l /usr/include/SDL/SDL.h' (substituting
the path returned in the previous command if it was different).  If
either of these steps don't work, that means that your sdl-dev package
is not installed.

Richard


Jason Ward wrote:
Hi
I downloaded pygame source and I've been trying to install it on my suse
10.2 linux.
It says I need sdl-dev when I run setup.py from the console with the
command, python setup.py install

So I downloaded, the source of sdl and the src.rpm and the dev rpm and
the runtime.
But with any or all of these installed I still get the error message.
You should put a link on the site for the required sdl files.

PS. How do I make python scripts executable on linux? (My first time
using linux)
How do I get it so that I can open with IDLE?
running scripts from console is a mission

Thanks guys