Installing Pymunk - Ubuntu 10.04
Page 1 of 1
Installing Pymunk - Ubuntu 10.04
How to get pyMunk working on Ubuntu 10.04
This guide is intended to show you how to get started with the 2D physics engine Chipmunk in your pygame program. I don't assume much knowledge but you do need to know how to open a terminal and use it to a small degree.
Step 1: Install everything you need.
Firstly, I'm assuming you have Pygame installed (this is easily from Synaptic, go to System -> Administration -> Synaptic Package manager, search for Pygame and install the python-pygame package). Next (the slightly harder part) you'll need to download the Chipmunk C libs from http://files.slembcke.net/chipmunk/release/ChipmunkLatest.tgz. Extract the files somewhere. To build the libraries needs a little extra work: I found that the directory contained a whole bunch of ._* files; to remove these, open a terminal, go to the Chipmunk-5.2.0 directory and enter this command:
find . -type f -name "._*" -exec rm -rvf {} \;
Then we can easily build and test the basic engine with:
cmake .
make
./Demo/chipmunk_demos
The next step is to install the python wrapper. So, again, go grab the files from http://pymunk.googlecode.com/files/pymunk-1.0.0.zip, extract the files somewhere, cd to the directory and enter this command to install everything correctly. It might have to grab a small file from the internet, but otherwise you should have no problems.
sudo python setup.py install
To finally test the whole thing, run this:
python ./examples/bouncing_balls.py
If this runs, you are good to go!
This guide is intended to show you how to get started with the 2D physics engine Chipmunk in your pygame program. I don't assume much knowledge but you do need to know how to open a terminal and use it to a small degree.
Step 1: Install everything you need.
Firstly, I'm assuming you have Pygame installed (this is easily from Synaptic, go to System -> Administration -> Synaptic Package manager, search for Pygame and install the python-pygame package). Next (the slightly harder part) you'll need to download the Chipmunk C libs from http://files.slembcke.net/chipmunk/release/ChipmunkLatest.tgz. Extract the files somewhere. To build the libraries needs a little extra work: I found that the directory contained a whole bunch of ._* files; to remove these, open a terminal, go to the Chipmunk-5.2.0 directory and enter this command:
find . -type f -name "._*" -exec rm -rvf {} \;
Then we can easily build and test the basic engine with:
cmake .
make
./Demo/chipmunk_demos
The next step is to install the python wrapper. So, again, go grab the files from http://pymunk.googlecode.com/files/pymunk-1.0.0.zip, extract the files somewhere, cd to the directory and enter this command to install everything correctly. It might have to grab a small file from the internet, but otherwise you should have no problems.
sudo python setup.py install
To finally test the whole thing, run this:
python ./examples/bouncing_balls.py
If this runs, you are good to go!
maximinus- Admin
- Posts : 63
Join date : 2010-06-04
Age : 51
Location : Harbin, China
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|