pygame is sharing code with you

Bitbucket is a code hosting site. Unlimited public and private repositories. Free for small teams.

Don't show this again

pygame / pygame http://pygame.org/

Clone this repository (size: 15.4 MB): HTTPS / SSH
hg clone https://bitbucket.org/pygame/pygame
hg clone ssh://hg@bitbucket.org/pygame/pygame

Issues

#82 homebrew on Leopard fails to install

Reported by illume

There is a report of homebrew failing to install on OS X Leopard.

Following the directions at this url there is an error: http://www.daskrachen.com/2011/03/installing-pygame-using-homebrew.html

Status: open Responsible: illume Type: bug Priority: major
Milestone: none Component: none Version: none

Attachments

Comments and changes

  1. #1 illume

    written

    It would be great to get pygame packaged in homebrew. So people could just do brew install pygame.

  2. #2 illume

    written , last edited

    • Changed responsible from nobody to illume.
    • Changed status from new to open.

    I got this working on OSX Lion:

    brew install python
    /usr/local/share/python/easy_install mecurial
    
    brew install sdl
    brew install sdl_mixer
    brew install sdl_ttf
    brew install sdl_image
    
    hg clone https://bitbucket.org/pygame/pygame
    cd pygame
    /usr/local/bin/python setup.py install
    

    I tried to create a basic foruma to do it, but it failed to build so far.

    I tried this `/usr/local/share/python/pip install pygame` But there is an error with the the camera module on x64 with SeqGrabComponent and friends stuff on osx Lion.

  3. #3 beniamino38

    written

    Homebrew doesn't duplicate other packaging systems, so they won't accept a pygame brew (since it would duplicate pip install pygame).

    As of today, I can successfully(*) install pygame for the system python using:

    brew install sdl sdl_image sdl_mixer sdl_ttf smpeg portmidi sudo pip install hg+http://bitbucket.org/pygame/pygame

    I think this is about as easy as it can get.

    (*)When I do pygame.init(), it crashes with some issue about bumpy arrays (float96) but I guess this is a separate issue.

  4. #4 illume

    written

    Cool, thanks for the info.

    I fixed that float96 issue with numpy now.

    So some updated instructions:

    How to install via the python in your path (likely the apple python):

    brew install sdl sdl_image sdl_mixer sdl_ttf smpeg portmidi 
    sudo pip install hg+http://bitbucket.org/pygame/pygame
    

    How to install to the brew supplied python.

    brew install python
    brew install sdl sdl_image sdl_mixer sdl_ttf smpeg portmidi 
    /usr/local/share/python/pip install hg+http://bitbucket.org/pygame/pygame
    
  5. #5 illume

    written

    • Changed status from open to resolved.

    Marking as resolved, since these instructions seem to work for people.

  6. #6 illume

    written

    Issue #58 was marked as a duplicate of this issue.

  7. #7 Anonymous

    written

    i just tried the first brew instruction to install pygame and i received the error message "hg command not found"

  8. #8 illume

    written

    • Changed status from resolved to open.

    Hello,

    ah, ok. I've updated the instructions to list installing mercurial first.

    I hope it works this time.

    cheers,


    Install mercurial from the .dmg from http://mercurial.selenic.com/ Or install mercurial via brew:

    brew install mercurial
    

    How to install via the python in your path (likely the apple python):

    brew install sdl sdl_image sdl_mixer sdl_ttf smpeg portmidi 
    sudo pip install hg+http://bitbucket.org/pygame/pygame
    

    How to install to the brew supplied python.

    brew install python
    brew install sdl sdl_image sdl_mixer sdl_ttf smpeg portmidi 
    /usr/local/share/python/pip install hg+http://bitbucket.org/pygame/pygame
    
  9. #9 Ory Band

    written

    @beniamino38, your float96 problem might be related to numpy package.

    Try pip install numpy, it might fix your problem.

  10. #10 Ory Band

    written

    I am receiving the following error when trying to

    ~$ brew list
    cmake			gdbm			libmikmod		node			readline		sdl_ttf
    ctags			git			libogg			pkg-config		sdl			smpeg
    dos2unix		google-app-engine	libvorbis		portmidi		sdl_image		sqlite
    flac			lame			macvim			python			sdl_mixer
    
    ~$ hg --version
    Mercurial Distributed SCM (version 1.9.1)
    
    ~$ which pip
    /usr/local/share/python/pip
    
    ~$ pip install hg+http://bitbucket.org/pygame/pygame
    Downloading/unpacking hg+http://bitbucket.org/pygame/pygame
      Cloning hg http://bitbucket.org/pygame/pygame to /var/folders/YY/YYOJp8QIH2CUgOPkMSfo0U+++TI/-Tmp-/pip-XOlq4e-build
    ** unknown exception encountered, please report by visiting
    **  http://mercurial.selenic.com/wiki/BugTracker
    ** Python 2.7.2 (default, Sep  7 2011, 03:24:05) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]
    ** Mercurial Distributed SCM (version 1.9.1)
    ** Extensions loaded: hgattic, extdiff, color, pager
    Traceback (most recent call last):
      File "/usr/local/share/python/hg", line 38, in <module>
        mercurial.dispatch.run()
      File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/mercurial/dispatch.py", line 27, in run
        sys.exit(dispatch(request(sys.argv[1:])))
      File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/mercurial/dispatch.py", line 64, in dispatch
        return _runcatch(req)
      File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/mercurial/dispatch.py", line 87, in _runcatch
        return _dispatch(req)
      File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/mercurial/dispatch.py", line 679, in _dispatch
        cmdpats, cmdoptions)
      File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/mercurial/dispatch.py", line 454, in runcommand
        ret = _runcommand(ui, options, cmd, d)
      File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/mercurial/extensions.py", line 182, in wrap
        return wrapper(origfn, *args, **kwargs)
      File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/hgext/pager.py", line 107, in pagecmd
        return orig(ui, options, cmd, cmdfunc)
      File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/mercurial/extensions.py", line 182, in wrap
        return wrapper(origfn, *args, **kwargs)
      File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/hgext/color.py", line 368, in colorcmd
        return orig(ui_, opts, cmd, cmdfunc)
      File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/mercurial/dispatch.py", line 733, in _runcommand
        return checkargs()
      File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/mercurial/dispatch.py", line 687, in checkargs
        return cmdfunc()
      File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/mercurial/dispatch.py", line 676, in <lambda>
        d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
      File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/mercurial/util.py", line 385, in check
        return func(*args, **kwargs)
      File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/mercurial/commands.py", line 1041, in clone
        branch=opts.get('branch'))
      File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/mercurial/hg.py", line 317, in clone
        create=True)
      File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/mercurial/hg.py", line 98, in repository
        hook(ui, repo)
      File "/Users/ory/.hg/extensions/attic.py", line 693, in reposetup
        repo.attic = attic(ui, repo.join(''))
      File "/Users/ory/.hg/extensions/attic.py", line 60, in __init__
        self.opener = util.opener(self.path)
    AttributeError: 'module' object has no attribute 'opener'
      Complete output from command /usr/local/share/python/hg clone --noupdate -q http://bitbucket.org/pygame/pygame /var/folders/YY/YYOJp8QIH2CUgOPkMSfo0U+++TI/-Tmp-/pip-XOlq4e-build:
      
    ----------------------------------------
    Command /usr/local/share/python/hg clone --noupdate -q http://bitbucket.org/pygame/pygame /var/folders/YY/YYOJp8QIH2CUgOPkMSfo0U+++TI/-Tmp-/pip-XOlq4e-build failed with error code 1
    Storing complete log in /Users/ory/.pip/pip.log
    

    Any idea? :)

  11. #11 Ory Band

    written

    Never mind my last error, I fixed it. Was caused by a bad Mercurial plugin I installed (hg attic).

    This error is unrelated to PyGame or Homebrew. Carry on now, move along with your daily lives, nothing to see here. :)

  12. #12 Anonymous

    written

    I get:

    Error: This is a head-only formula; install with `brew install --HEAD smpeg`

    So having to do that step separately.

  13. #13 acidjunk

    written

    Installed all deps via homebrew. Running latest xcode 4.3.

    When I run /usr/local/share/python/pip install hg+http://bitbucket.org/pygame/pygame It fails with an clang error.

    In file included from src/scale_mmx.c:33:

    src/scale_mmx64.c:424:27: error: invalid instruction mnemonic 'movsxl'

    asm volatile( " /* MMX code for inner loop of X bilinear filter */ "

    ^

    <inline asm>191: note: instantiated into assembly here

    /* MMX code for inner loop of X bilinear filter */ movl -44(%rbp), %ecx; pxor %mm0, %mm0; 1: movsxl (%rdi), %rax; add $4, %rdi; movq (%r10), %mm1; add $8, %r10; movq (%rbx), %mm2; add $8, %rbx; movd (%r15,%rax,4), %mm4; movd 4(%r15,%rax,4), %mm5; punpcklbw %mm0, %mm4; punpcklbw %mm0, %mm5; pmullw %mm1, %mm4; pmullw %mm2, %mm5; paddw %mm4, %mm5; psrlw $8, %mm5; packuswb %mm0, %mm5; movd %mm5, (%r9); add $4, %r9; decl %ecx; jne 1b; emms;

    ^~~~~

    In file included from src/scale_mmx.c:33:

    src/scale_mmx64.c:499:27: error: invalid instruction mnemonic 'movsxl'

    asm volatile( " /* MMX code for inner loop of X bilinear filter */ "

    ^

    <inline asm>191: note: instantiated into assembly here

    /* MMX code for inner loop of X bilinear filter */ movl -44(%rbp), %ecx; pxor %mm0, %mm0; 1: movsxl (%rdi), %rax; add $4, %rdi; movq (%r10), %mm1; add $8, %r10; movq (%rbx), %mm2; add $8, %rbx; movd (%r15,%rax,4), %mm4; movd 4(%r15,%rax,4), %mm5; punpcklbw %mm0, %mm4; punpcklbw %mm0, %mm5; pmullw %mm1, %mm4; pmullw %mm2, %mm5; paddw %mm4, %mm5; psrlw $8, %mm5; packuswb %mm0, %mm5; movd %mm5, (%r9); add $4, %r9; decl %ecx; jne 1b; emms;

    ^~~~~

    2 errors generated.

    error: command '/usr/bin/clang' failed with exit status 1

    I think the patch at https://bitbucket.org/pygame/pygame/issue/94/src-scale_mmx64c-cannot-be-compiled-with fixes the problem. I don't know how to apply the patch.

  14. #14 acidjunk

    written

    I retried my build with Xcode 4.2.1: and It builds pygame just fine for pyhone homebrew Should I open another ticket for the Xcode 4.3 issue?

Add comment / attachment

Verification: Please write the text from the image in the box (letters only)

captcha

Is that you, Humanoid? Is this me?