On Wed, Jan 4, 2017 at 12:15 AM, Thomas Kluyver <takowl@xxxxxxxxx> wrote:
Thanks Irv for following up on this.
As I understand things, we can only conveniently build pygame as a 64 bit extension, but to make that installable on common Python installations, we have to pretend it supports 32 bit operation as well (which it doesn't). We thought this was unlikely to come up since all recent Macs are 64 bit; I wasn't aware that there was a separate 32-bit only Python installer.
Free python pygame 2.7 download for pc. Multimedia tools downloads - Python pygame by Pete Shinners, Rene Dudfield, Marcus von Appen, Bob Pendleton, others and many more programs are available for instant and free download. Hey guys, in this video I explain how to download and install pygame on a mac osx computer. This is extremely simple and fast and should not take you more th. I want to install pygame on Mac 10.6.8. I managed to install python 2.7.9 and to make it stable. I tried to install different versions of pygame but none worked: for.
We should definitely document this. Unfortunately I don't know of anything else we can do about it.
On 3 Jan 2017 1:48 a.m., 'Irv Kalb' <Irv@xxxxxxxxxxxxxx> wrote:
Pygame For Python 3.6
After days of experimentation, I finally have a working environment.
Reading through a bunch of posts where other people had encountered a similar problem, I found one post that said to try installing a different version of Python: Mac OS X 64-bit/32-bit installer (I had been installing the 32-bit version: Mac OS X 32-bit i386/PPC installer).
After installing that version, I then used this command to install the latest version of pygame (1.9.2) (more recent the most recent one showing on the pygame install page):
sudo pip install pygame
The combination of those two installs allows me to run Python with pygame on Mac Sierra 10.12.2.
This was extremely painful, and I would hope that this could be documented somewhere on the pygame installation page, so that someone with the same set up as me would not have to go through the same trial and error process.
Irv
On Dec 30, 2016, at 1:41 PM, Irv Kalb <Irv@xxxxxxxxxxxxxx> wrote:
To try to get pygame 1.9.2 installed easily (without any package managers), I tried doing the sudo install.
The install soaked correctly:
Downloading pygame-1.9.2-cp27-cp27m-macosx_10_9_intel.whl (4.8MB)
100% |████████████████████████████████| 4.8MB 125kB/s
Successfully installed pygame-1.9.2
But when I tried a simple import of pygame in the shell, it still fails (with the exact same message I saw earlier):
Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 12:40:10)
Type 'copyright', 'credits' or 'license()' for more information.
File '<pyshell#0>', line 0, in <module>
File '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/__init__.py', line 133, in <module>
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/base.so, 2): Symbol not found: _SDL_EnableUNICODE
Referenced from: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/base.so
in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/base.so
I am open to any other suggestions to get pygame running on Sierra with Python 2.7.13.
This should be easy ... but it is extremely frustrating that I've spent a few days trying to get this environment set up.
Irv
On Dec 29, 2016, at 2:34 PM, Daniel Foerster <pydsigner@xxxxxxxxx> wrote:
I'm thinking you should probably throw a sudo on the front of that (or whatever the Mac equivalent is).
On Dec 29, 2016, at 8:42 AM, Thomas Kluyver <takowl@xxxxxxxxx> wrote:
On 28 December 2016 at 23:41, Irv Kalb
<Irv@xxxxxxxxxxxxxx> wrote:
Also, when looking to find the latest version of pygame, on the pygame downloads site, I see version 1.9.1. But if I go to PyPi at
https://pypi.python.org/pypi/Pygame#downloads
It shows version 1.9.2. But that shows a wheel file (.whl).
Can anyone tell me if this is a more recent version that might fix the problems that I am seeing? And if so, is there a simple way to install a .whl file without going through a terminal prompt?
1.9.2 is the latest; unfortunately so far no-one has been able to update the downloads page.
The normal way to use wheels (.whl files) is to 'pip install pygame' at a command line. I don't know of a way to install them without using the terminal, and I don't know anything about building Mac GUI installers. Sorry!
Thanks very much for your response. I cleared out my 1.9.1 version of pygame, and used pip. Here's what happened:
Collecting pygame
Using cached pygame-1.9.2-cp27-cp27m-macosx_10_9_intel.whl
Exception:
File'/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/basecommand.py', line 215, in main
File'/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/commands/install.py', line 342, in run
File'/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/req/req_set.py', line 784, in install
File'/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/req/req_install.py', line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File'/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/req/req_install.py', line 1064, in move_wheel_files
File'/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/wheel.py', line 377, in move_wheel_files
clobber(source, dest, False, fixer=fixer, filter=filter)
File'/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/wheel.py', line 329, in clobber
os.utime(destfile, (st.st_atime, st.st_mtime))
OSError: [Errno 1] Operation not permitted:'/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/pygame/bitmask.h'
However, that did leave me with a pygame folder and a pygame-1.9.2-dist-info folder in my site-packages folder. And when I try to do import it from the shell in IDLE, I get this:
Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 12:40:10)
Type 'copyright', 'credits' or 'license()' for more information.
File '<pyshell#0>', line 0, in <module>
File'/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/__init__.py', line 133, in <module>
ImportError:dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/base.so, 2): Symbol not found: _SDL_EnableUNICODE
Referenced from:/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/base.so
in/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/base.so
Something looks very wrong. Any other suggestions for getting a stable Python/IDLE environment with pygame on Mac Sierra (10.12)?
Thanks,
Irv
Edit me
Pygame is a set of Python modules used for writing simple video games and graphical programs. It is cross-platform, which means it can be installed on both Windows and Mac computers. This guide provides the steps needed to install Pygame for Python 3.6 on Windows and macOS.
Procedure (Windows 10)
- Make sure to have the latest version of Python 3 installed on your computer. If you need to install Python 3, you can visit (this site) to install the latest Python 3 release.
When running the Python installer, you will have to select Customize installation. Click Next and check the box next to Install for all users at the top of the list in Advanced Options. You can now click Install.
- Once Python 3 is installed, launch the File Explorer.
Click This PC, select the drive where Windows is installed (usually the C: drive), double-click on the Program Files (x86) folder, and double-click on the Python folder (i.e. Python36-32).
Click on the path in the text box towards the top of the File Explorer window and copy it to the clipboard.
- Next, you will need to launch the Control Panel. To do this, open the Start Menu and search control in the search box. The Control Panel should be the first option that appears in the Start Menu.
- Click on System and Security, then System, then Advanced System Settings.
In the window that appears, click on Enviroment Variables…
You will need to edit the Path system variable. To do this, select Path in the System variables section of the window and click Edit…
- Click New and paste the path copied from earlier into the empty textbox that is generated. Click OK twice to save the changes.
- You will now need to open the Command Prompt as an administrator. To do this, open the start menu and search cmd in the search box. The Command Prompt should be the first option that appears in the Start Menu. Right click on that option and choose Run as administrator.
- In the Command Prompt, type cd and a space and right-click in the Command Prompt to paste the path to Python. Press Enter.
- Type this command into the Command Prompt and press Enter:
- You can now install Pygame. To do this, type the following command and press Enter:
- Pygame should have successfully installed. To verify this, type the following command to launch the Python interactive interpreter:
- Type the following line in the interpreter and press Enter:
If entering the previous line into the interpreter does not throw any errors, you have successfully installed Pygame on Windows. You can now write any graphical program you want using the Pygame library.
Procedure (Mac OS X)
Pygame Download Python 3 8
This guide is based on an article found (here)
- Before installing Pygame, there are many dependencies that will need to be installed. Begin by installing the XCode developer tools, which can be done through the app store.
- Next you will need to install the latest version of XQuartz. You can start the installation by visiting the site (here).
Open a Terminal window. This can be done by pressing command+Space (⌘+Space) and typing Terminal in the search bar and pressing Enter.
- You now need to install Homebrew. You can do this by typing the following command in the Terminal and pressing Enter:
- After the installation is finished, you will need to type the following commands in the Terminal, pressing Enter after each one:
- You can now install Python 3 using Homebrew. To do this, type the following command in the Terminal and press Enter:
- Now you need to install several dependencies for Pygame. Type the following commands in the Terminal, pressing Enter after each one:
- You are ready to install Pygame. Type the following command in the Terminal and press Enter. Note that you will probably have to enter your password in the Terminal in order for the command to run:
- To verify the installation, you will have to launch the correct version of IDLE. You can find this by opening Finder, clicking on Go in the top left of the screen, then clicking on the Go to Folder… option.
- In the search bar, enter /usr/local/Cellar/python and click Go.
- Navigate to the folder where Python 3 is located. It will probably be named in this format: 3.x.x.
- Launch the IDLE 3 app within the folder. When launched, it should be using Python 3.x.x.
- In the IDLE interpreter, type the following command and press Enter:
If the command completed without throwing any errors, you have successfully installed Pygame and found the correct version of IDLE to use for Pygame programming.
- To make finding this version of IDLE easier, you can create a Desktop shortcut for IDLE 3. If you want to do this, press and hold the control key and click on IDLE 3. It will open a Menu where you can select Make Alias and create another IDLE 3 icon. You can name this icon whatever you like, but make sure to drag it to your Desktop when you are done.