Skip to main content

pymunk - 3.0.0

Pymunk is a easy-to-use pythonic 2d physics library that can be used whenever you need 2d rigid body physics from Python.


Victor Blomqvist
(viblo)

Pymunk is a easy-to-use pythonic 2d physics library that can be used whenever you need 2d rigid body physics from Python. Perfect when you need 2d physics in your game, demo or other application! It is built on top of the very capable 2d physics library Chipmunk.

The first version was released in 2007 and Pymunk is still actively developed and maintained today.

Pymunk has been used with success in many projects, big and small. For example: 3 Pyweek game competition winners, more than a dozen published scientific papers and even in a self-driving car simulation! See the Showcases section on the Pymunk webpage for some examples.

The easiest way to install Pymunk is with pip install:
pip install pymunk -U
It has one direct dependency. CFFI.

For full docs, examples and updates, go to www.pymunk.org!

The release list here is not always up to date. Make sure to use pip install as described above, or visit the Pymunk homepage for the latest version!

Changes

I’m happy to announce pymunk 3!

This release is a definite improvement over the 2.x release line of pymunk. It features a much improved documentation, an updated Chipmunk version with accompanying API adjustments, more and cooler examples. Also, to help to do quick prototyping pymunk now includes a new module pymunk.pygame_util that can draw most physics objects on a pygame surface. Check out the new pygame_util_demo.py example to get an understanding of how it works.

Another new feature is improved support to run in non-debug mode. Its now possible to pass a compile flag to setup.py to build Chipmunk in release mode and there’s a new module, pymunkoptions that can be used to turn pymunk debug prints off.

This release has been tested and runs on CPython 2.6, 2.7, 3.2. At least one run of the unit tests have been made on the following platforms: 32 bit Python on Windows, 32 and 64 bit Python on Linux, and 32 and 64 bit Python on OSX.

This release has also been tested on Pypy 1.9, with all tests passed!

Changes

  • Several new and interesting examples added
  • New draw module to help with pygame prototyping
  • New pymunkoptions module to allow disable of debug
  • Tested on OSX, includes a compiled dylib file
  • Much extended and reworked documentation and homepage
  • Update of Chipmunk
  • Smaller API changes
  • General polish and cleanup
  • Shining new domain: www.pymunk.org

I hope you will like it!

Links

Home Page
http://www.pymunk.org/
Source
http://pymunk.googlecode.com/files/pymunk-3.0.0.zip
Windows
http://pymunk.googlecode.com/files/pymunk-3.0.0.win32.exe

Releases

pymunk 0.8 — 15 Jun, 2008

pymunk 0.8.1 — 1 Nov, 2008

pymunk 0.8.2 — 22 Apr, 2009

pymunk 0.8.4 — 16 Aug, 2009

pymunk 0.8.3 — 26 Jul, 2009

pymunk 1.0.0 — 17 Mar, 2010

pymunk 3.0.0 — 2 Sep, 2012

pymunk 4.0.0 — 25 Aug, 2013

pymunk 5.4.2 — 13 Jan, 2019

pymunk 5.5.0 — 4 May, 2019

pymunk 5.6.0 — 12 Nov, 2019

pymunk 5.7.0 — 17 Sep, 2020

pymunk 6.0.0 — 8 Dec, 2020

Pygame.org account Comments

  • Viblo 2011-05-03 10:56

    If you are using pymunk you might be happy to hear that a new (major) release of pymunk is coming soon. In case you have some time over during the next couple of days, please give the latest svn version of pymunk a try and give me some comments on how it feels. Check this post I made on the chipmunk forums for a little more details: http://www.slembcke.net/forums...

    renesd 2011-05-03 14:24

    hi,

    on apple python I get an error...
    OSError: dlopen(/Library/Python/2.6/site-packages/pymunk/libchipmunk.dylib, 6): image not found

    It seems libchipmunk.so is there instead. I installed with python setup.py install

    cheers,

    Viblo 2011-05-08 06:13

    Problem is that I don't ship the libchipmunk.dylib file with pymunk. Therefor you have to compile it yourself, with the build_chipmunk command (and after that you might need to rerun the install):

    >python setup.py build_chipmunk

    Right now I only have a MS Vista laptop, together with a Win Server 2008 machine at work, so Im only able to copmile Chipmunk on Windows and Linux, meaning I can include a .dll for windows, and a .so file for 32bit linux. (Linux running in virtual box VM, unfortunately its not possible to run OSX hosted as a VM in a good way because of Apples restrictions).

    I wonder if you got an error message with roughly this explanation when it failed? I think I have some code for it, but it would be good to hear if it works in practive, and if/how I can improve it to make it more obvious for users?

  • Fla5h 2013-03-14 23:37

    I'm having trouble rotating my circle while moving it with the keys. Can someone please help?

  • Lexter Freile 2017-12-20 18:47

    good library
  • Berenguer 2019-05-05 09:25

    Excellent !.