Python Forum
Python and Pygame installation
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python and Pygame installation
#1
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
Reply
#2
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
Recommended Tutorials:
Reply
#3
I installed python 2.7.14 MacOSX 32bit/64bit and there is no pygame 64 bit?????????
Reply
#4
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?
Recommended Tutorials:
Reply
#5
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
Reply
#6
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.
Recommended Tutorials:
Reply
#7
THANK YOU IT WORKED!!!!!!!!!! I forced it to work on terminal!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Python installation for old MacOS Yonix 1 488 Sep-21-2023, 03:32 PM
Last Post: menator01
  Installation of packages to newest Python version from previous one Andrzej_Andrzej 3 829 Jul-15-2023, 11:32 AM
Last Post: snippsat
  How to see the date of installation of python modules. newbieAuggie2019 4 1,572 Mar-31-2023, 12:40 PM
Last Post: newbieAuggie2019
  Getting "SSL client not supported by this Python installation" error prabirsarkar 0 950 Mar-13-2023, 05:01 PM
Last Post: prabirsarkar
  python installation/running inside singularity container erdemath 2 1,769 Sep-21-2022, 08:13 AM
Last Post: erdemath
Question Python V3.11 Installation Help Danno 2 1,093 Aug-11-2022, 02:30 AM
Last Post: Danno
  Portable installation of Python possible? pstein 2 3,072 Nov-15-2020, 12:14 PM
Last Post: snippsat
  python and openCV installation dejhost 16 10,815 Aug-04-2020, 02:23 AM
Last Post: snippsat
  No Scripts File present after python installation ag2207 5 4,883 Jul-30-2020, 11:11 AM
Last Post: buran
  Cannot find Python installation folder when I install Anaconda bsbsbsbs 1 2,215 Jul-14-2020, 03:14 PM
Last Post: dgrunwal

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020