Python Forum

Full Version: Python and Pygame installation
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi everyone, It is me again.
I have python 2.7.14 for Mac OSX and I want to install pygame. I have installed pygame-1.9.1release-python.org-32bit-py2.7-maxosx10.3.dmg. It seems this is not compatible with 2.7.14. Can someone please send me a link or offer suggestions to help make it work. It seems there is a problem because there is a mismatch of "bits."
Thank you,
Benji Pincus
Quote:pygame-1.9.1release-python.org-32bit-py2.7-maxosx10.3.dmg
If it is a mismathc of bits, this one is for 32 bits, then that would be safe to assume that you are using 64 bits? So get the 64 bit one instead.

I know mac can be a little bit more of a pain in the ass to install pygame on tha linux or windows
https://pygame.org/wiki/macintosh
I installed python 2.7.14 MacOSX 32bit/64bit and there is no pygame 64 bit?????????
you should be able to do
pip install pygame
on your temrinal and it install everything (correct one) for you. Where are you getting this anyways?
Getting this from pygame.com

Everything seems fine
It says:

Requirement already satisfied: pygame in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages

This is what I get when I put import pygame in idle:

Traceback (most recent call last):
  File "<pyshell#2>", line 1, in <module>
    import pygame
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/__init__.py", line 95, in <module>
    from pygame.base import *
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/base.so, 2): no suitable image found.  Did find:
	/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/base.so: no matching architecture in universal wrapper
try this suggestion

Quote:The Python 2.7.3 .dmg Mac OS installer installs both 64-bit and 32-bit binaries in:

/Library/Frameworks/Python.framework/Versions/2.7/bin/

There is a 32-bit binary called python2.7-32 in that folder.

To use it in the Terminal simply type $ python2.7-32 instead of python

To use it in IDLE simply rename the 64-bit python2.7 binary to something like python2.7-64 then rename python2.7-32' topython2.7` and next time you launch IDLE or the Terminal it will use the 32-bit binary. Change it back when you are done.

You can also force launch IDLE in 32-bit mode from the Terminal:

$ arch -i386 /Library/Frameworks/Python.framework/Versions/2.7/bin/idle2.7 -n

You can create a shell script Automator application to make it easier to launch.
THANK YOU IT WORKED!!!!!!!!!! I forced it to work on terminal!