Re: SOLVED ... Re: [pygame] Python 2.7 with pygame on Mac Sierra (10.12.2)

2017-01-10 Thread Thomas Kluyver
On 10 January 2017 at 00:25, René Dudfield  wrote:

> I did have 32bit builds 'working' previously. I'm looking into how this
> works now, and why this was removed?


IIRC, some of the libraries we install from Homebrew did not offer a
universal build. I think there may have been some other issues too that
cleared up when we stopped trying to build 32-bit extensions.

> since I know of at least a few classrooms still using old 32bit macs

Do those old macs have OSX 10.9 or newer installed? Those are the only
versions our wheels work with in any case. Even that relies on an
undocumented Travis image which will be retired later this month; after
that the wheel builds will be for >= 10.10.


Re: SOLVED ... Re: [pygame] Python 2.7 with pygame on Mac Sierra (10.12.2)

2017-01-09 Thread René Dudfield
I did have 32bit builds 'working' previously. I'm looking into how this
works now, and why this was removed? It's a small number of people using 32
bit macs... but since I know of at least a few classrooms still using old
32bit macs which teach python and pygame I feel it's worth my effort.

best,

On Wed, Jan 4, 2017 at 12:15 AM, Thomas Kluyver  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.
>
> 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"  wrote:
>
>> 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 installe
>> r
>>  (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  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:
>> Collecting pygame
>>   Downloading pygame-1.9.2-cp27-cp27m-macosx_10_9_intel.whl (4.8MB)
>> 100% || 4.8MB 125kB/s
>> Installing collected packages: pygame
>> Successfully installed pygame-1.9.2
>> IrvKalbs-MBP:~ irvkalb$
>>
>> 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)
>> [GCC 4.2.1 (Apple Inc. build 5577)] on darwin
>> Type "copyright", "credits" or "license()" for more information.
>> >>> import pygame
>>
>> Traceback (most recent call last):
>>   File "", line 0, in 
>>   File "/Library/Frameworks/Python.framework/Versions/2.7/lib/pytho
>> n2.7/site-packages/pygame/__init__.py", line 133, in 
>> from pygame.base import *
>> 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.fra
>> mework/Versions/2.7/lib/python2.7/site-packages/pygame/base.so
>>   Expected in: flat namespace
>>  in /Library/Frameworks/Python.framework/Versions/2.7/lib/python
>> 2.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  wrote:
>>
>> I'm thinking you should probably throw a sudo on the front of that (or
>> whatever the Mac equivalent is).
>>
>> On 12/29/2016 04:15 PM, Irv Kalb wrote:
>>
>>
>> On Dec 29, 2016, at 8:42 AM, Thomas Kluyver  wrote:
>>
>> On 28 December 2016 at 23:41, Irv Kalb  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 

SOLVED ... Re: [pygame] Python 2.7 with pygame on Mac Sierra (10.12.2)

2017-01-02 Thread Irv Kalb
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 installe 
r  (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  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:
> Collecting pygame
>   Downloading pygame-1.9.2-cp27-cp27m-macosx_10_9_intel.whl (4.8MB)
> 100% || 4.8MB 125kB/s 
> Installing collected packages: pygame
> Successfully installed pygame-1.9.2
> IrvKalbs-MBP:~ irvkalb$ 
> 
> 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) 
> [GCC 4.2.1 (Apple Inc. build 5577)] on darwin
> Type "copyright", "credits" or "license()" for more information.
> >>> import pygame
> 
> Traceback (most recent call last):
>   File "", line 0, in 
>   File 
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/__init__.py",
>  line 133, in 
> from pygame.base import *
> 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
>   Expected in: flat namespace
>  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 > > wrote:
>> 
>> I'm thinking you should probably throw a sudo on the front of that (or 
>> whatever the Mac equivalent is).
>> 
>> On 12/29/2016 04:15 PM, Irv Kalb wrote:
>>> 
 On Dec 29, 2016, at 8:42 AM, Thomas Kluyver > wrote:
 
 On 28 December 2016 at 23:41, Irv Kalb > 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:
>>> 
>>> IrvKalbs-MBP:~ irvkalb$ pip install pygame
>>> Collecting pygame
>>>   Using cached pygame-1.9.2-cp27-cp27m-macosx_10_9_intel.whl
>>> Installing collected packages: pygame
>>> Exception:
>>> Traceback (most recent call last):
>>>   File 
>>> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/basecommand.py",
>>>  line 215, in main
>>> status = self.run(options, args)
>>>   File 
>>> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/commands/install.py",
>>>  line 342, in run
>>> prefix=options.prefix_path,
>>>   File 
>>> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/req/req_set.py",
>>>  

Re: [pygame] Python 2.7 with pygame on Mac Sierra (10.12.2)

2016-12-30 Thread Russell Jones
It's simpler, but not easier... modifying the system Python on OS X is a
bad idea. See https://docs.python.org/3/using/mac.html AIUI it's not even
possible with SIP enabled on 10.11+

Russell

On 30 December 2016 at 21:41, Irv Kalb  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:
> Collecting pygame
>   Downloading pygame-1.9.2-cp27-cp27m-macosx_10_9_intel.whl (4.8MB)
> 100% || 4.8MB 125kB/s
> Installing collected packages: pygame
> Successfully installed pygame-1.9.2
> IrvKalbs-MBP:~ irvkalb$
>
> 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)
> [GCC 4.2.1 (Apple Inc. build 5577)] on darwin
> Type "copyright", "credits" or "license()" for more information.
> >>> import pygame
>
> Traceback (most recent call last):
>   File "", line 0, in 
>   File "/Library/Frameworks/Python.framework/Versions/2.7/lib/
> python2.7/site-packages/pygame/__init__.py", line 133, in 
> from pygame.base import *
> 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
>   Expected in: flat namespace
>  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  wrote:
>
> I'm thinking you should probably throw a sudo on the front of that (or
> whatever the Mac equivalent is).
>
> On 12/29/2016 04:15 PM, Irv Kalb wrote:
>
>
> On Dec 29, 2016, at 8:42 AM, Thomas Kluyver  wrote:
>
> On 28 December 2016 at 23:41, Irv Kalb  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:
>
> IrvKalbs-MBP:~ irvkalb$ pip install pygame
> Collecting pygame
>   Using cached pygame-1.9.2-cp27-cp27m-macosx_10_9_intel.whl
> Installing collected packages: pygame
> Exception:
> Traceback (most recent call last):
>   File "/Library/Frameworks/Python.framework/Versions/2.7/lib/
> python2.7/site-packages/pip/basecommand.py", line 215, in main
> status = self.run(options, args)
>   File "/Library/Frameworks/Python.framework/Versions/2.7/lib/
> python2.7/site-packages/pip/commands/install.py", line 342, in run
> prefix=options.prefix_path,
>   File "/Library/Frameworks/Python.framework/Versions/2.7/lib/
> python2.7/site-packages/pip/req/req_set.py", line 784, in install
> **kwargs
>   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
> isolated=self.isolated,
>   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'
> IrvKalbs-MBP:~ irvkalb$
>
> 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 

Re: [pygame] Python 2.7 with pygame on Mac Sierra (10.12.2)

2016-12-30 Thread Irv Kalb
To try to get pygame 1.9.2 installed easily (without any package managers), I 
tried doing the sudo install.

The install soaked correctly:
Collecting pygame
  Downloading pygame-1.9.2-cp27-cp27m-macosx_10_9_intel.whl (4.8MB)
100% || 4.8MB 125kB/s 
Installing collected packages: pygame
Successfully installed pygame-1.9.2
IrvKalbs-MBP:~ irvkalb$ 

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) 
[GCC 4.2.1 (Apple Inc. build 5577)] on darwin
Type "copyright", "credits" or "license()" for more information.
>>> import pygame

Traceback (most recent call last):
  File "", line 0, in 
  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/__init__.py",
 line 133, in 
from pygame.base import *
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
  Expected in: flat namespace
 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  wrote:
> 
> I'm thinking you should probably throw a sudo on the front of that (or 
> whatever the Mac equivalent is).
> 
> On 12/29/2016 04:15 PM, Irv Kalb wrote:
>> 
>>> On Dec 29, 2016, at 8:42 AM, Thomas Kluyver >> > wrote:
>>> 
>>> On 28 December 2016 at 23:41, Irv Kalb >> > 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:
>> 
>> IrvKalbs-MBP:~ irvkalb$ pip install pygame
>> Collecting pygame
>>   Using cached pygame-1.9.2-cp27-cp27m-macosx_10_9_intel.whl
>> Installing collected packages: pygame
>> Exception:
>> Traceback (most recent call last):
>>   File 
>> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/basecommand.py",
>>  line 215, in main
>> status = self.run(options, args)
>>   File 
>> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/commands/install.py",
>>  line 342, in run
>> prefix=options.prefix_path,
>>   File 
>> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/req/req_set.py",
>>  line 784, in install
>> **kwargs
>>   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
>> isolated=self.isolated,
>>   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'
>> IrvKalbs-MBP:~ irvkalb$ 
>> 
>> 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) 
>> [GCC 4.2.1 (Apple Inc. 

Re: [pygame] Python 2.7 with pygame on Mac Sierra (10.12.2)

2016-12-29 Thread Russell Jones
Don't install it with sudo. Use a virtualenv or install a package manager
such as MacPorts or Anaconda.

Russell

On 29 December 2016 at 22:34, Daniel Foerster  wrote:

> I'm thinking you should probably throw a sudo on the front of that (or
> whatever the Mac equivalent is).
>
> On 12/29/2016 04:15 PM, Irv Kalb wrote:
>
>
> On Dec 29, 2016, at 8:42 AM, Thomas Kluyver  wrote:
>
> On 28 December 2016 at 23:41, Irv Kalb  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:
>
> IrvKalbs-MBP:~ irvkalb$ pip install pygame
> Collecting pygame
>   Using cached pygame-1.9.2-cp27-cp27m-macosx_10_9_intel.whl
> Installing collected packages: pygame
> Exception:
> Traceback (most recent call last):
>   File "/Library/Frameworks/Python.framework/Versions/2.7/lib/
> python2.7/site-packages/pip/basecommand.py", line 215, in main
> status = self.run(options, args)
>   File "/Library/Frameworks/Python.framework/Versions/2.7/lib/
> python2.7/site-packages/pip/commands/install.py", line 342, in run
> prefix=options.prefix_path,
>   File "/Library/Frameworks/Python.framework/Versions/2.7/lib/
> python2.7/site-packages/pip/req/req_set.py", line 784, in install
> **kwargs
>   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
> isolated=self.isolated,
>   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'
> IrvKalbs-MBP:~ irvkalb$
>
> 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)
> [GCC 4.2.1 (Apple Inc. build 5577)] on darwin
> Type "copyright", "credits" or "license()" for more information.
> >>> import pygame
>
> Traceback (most recent call last):
>   File "", line 0, in 
>   File "/Library/Frameworks/Python.framework/Versions/2.7/lib/
> python2.7/site-packages/pygame/__init__.py", line 133, in 
> from pygame.base import *
> 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
>   Expected in: flat namespace
>  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
>
>
>
>
>
>
>
>


Re: [pygame] Python 2.7 with pygame on Mac Sierra (10.12.2)

2016-12-29 Thread Daniel Foerster
I'm thinking you should probably throw a sudo on the front of that (or 
whatever the Mac equivalent is).



On 12/29/2016 04:15 PM, Irv Kalb wrote:


On Dec 29, 2016, at 8:42 AM, Thomas Kluyver > wrote:


On 28 December 2016 at 23:41, Irv Kalb > 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:


IrvKalbs-MBP:~ irvkalb$ pip install pygame
Collecting pygame
  Using cached pygame-1.9.2-cp27-cp27m-macosx_10_9_intel.whl
Installing collected packages: pygame
Exception:
Traceback (most recent call last):
File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/basecommand.py", 
line 215, in main

  status = self.run(options, args)
File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/commands/install.py", 
line 342, in run

  prefix=options.prefix_path,
File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/req/req_set.py", 
line 784, in install

  **kwargs
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

  isolated=self.isolated,
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'

IrvKalbs-MBP:~ irvkalb$

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)
[GCC 4.2.1 (Apple Inc. build 5577)] on darwin
Type "copyright", "credits" or "license()" for more information.
>>> import pygame

Traceback (most recent call last):
  File "", line 0, in 
  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/__init__.py", 
line 133, in 

from pygame.base import *
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

  Expected in: flat namespace
 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










Re: [pygame] Python 2.7 with pygame on Mac Sierra (10.12.2)

2016-12-29 Thread Irv Kalb

> On Dec 29, 2016, at 8:42 AM, Thomas Kluyver  wrote:
> 
> On 28 December 2016 at 23:41, Irv Kalb  > 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:

IrvKalbs-MBP:~ irvkalb$ pip install pygame
Collecting pygame
  Using cached pygame-1.9.2-cp27-cp27m-macosx_10_9_intel.whl
Installing collected packages: pygame
Exception:
Traceback (most recent call last):
  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/basecommand.py",
 line 215, in main
status = self.run(options, args)
  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/commands/install.py",
 line 342, in run
prefix=options.prefix_path,
  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/req/req_set.py",
 line 784, in install
**kwargs
  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
isolated=self.isolated,
  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'
IrvKalbs-MBP:~ irvkalb$ 

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) 
[GCC 4.2.1 (Apple Inc. build 5577)] on darwin
Type "copyright", "credits" or "license()" for more information.
>>> import pygame

Traceback (most recent call last):
  File "", line 0, in 
  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/__init__.py",
 line 133, in 
from pygame.base import *
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
  Expected in: flat namespace
 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








Re: [pygame] Python 2.7 with pygame on Mac Sierra (10.12.2)

2016-12-29 Thread Thomas Kluyver
On 28 December 2016 at 23:41, Irv Kalb  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!


[pygame] Python 2.7 with pygame on Mac Sierra (10.12.2)

2016-12-28 Thread Irv Kalb
Hi, 

First time poster.  I hope I'm doing this correctly.

I teach Python at colleges in the San Francisco Bay Area.  And I have been 
using Python and pygame for a number of years.  ... And I'm a Mac guy.  I have 
had a stable Python & pygame environment for a number of years.  (Using 32 bit 
Python and pygame 1.9.1 on Mac 10.10).

For a number of reasons, I decided to upgrade my Mac OS to the latest version, 
10.12.  Since then I have not been able to get pygame working.  I first ran 
into a problem trying to use any fonts.  Researching the issue, I found this 
link:  https://bitbucket.org/pygame/pygame/commits/bf49fd02a920 
  (from 2013) that 
shows a minor change to a python file (sysfont.py).  That fixed the font 
problem.

But now, I have run into a problem trying to use any sound.  In my typical 
programs, I typically load a sound like this:

someSound = pygame.mixer.Sound("sounds/someSound.wav")

But when I try to run that with this new set up, I get this:

Traceback (most recent call last):
  File "/Users/irvkalb/Desktop/MyProgram.py", line 219, in 
someSound = pygame.mixer.Sound('sounds/someSound.wav')
error: mixer system not initialized

If I try making a call to initialize the sound mixer:

pygame.mixer.init()

I get this:

Traceback (most recent call last):
  File "/Users/irvkalb/Desktop/SlotMachine/OO-SlotMachines.py", line 11, in 

pygame.mixer.init()
error: Failed to start CoreAudio: AudioUnitSetProperty 
(kAudioUnitProperty_SetInputCallback)

Doing some research on that leads to listing of a C file "SDL_coreaudio.c".  
But I don't want to track down and correct any C code.


My question is:  Is there a simple way to install Python 2.7 with a working 
version of pygame, to run on Mac Sierra?  If so, can someone please let me know 
how to do this?

I am looking for a series of steps that I can explain to my students - who are 
typically art students, who have absolutely no background in Unix commands, so 
anything involving Unix commands is not feasible.


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?


Sorry for so many questions, but getting the environment set up so that it is 
usable on the latest version of the Mac OS has been painful.

Thanks in advance,

Irv