1

I'm running mac osx siera on my macbook pro and I'm trying to install pygame with my python installation. I've tried installing it a couple ways, but when I try to check for it or test it, pygame doesn't seem to be there. If anyone can please let me know how to do this or what I'm doing wrong I'd really appreciate it.

Code:

## Checking python version

Macbook-Pro:~ myname$ python
Python 2.7.13 |Anaconda custom (x86_64)| (default, Dec 20 2016, 23:05:08) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org



## Checking for pygame


Macbook-Pro:~ myname$ conda search pygame
Fetching package metadata ...........

PackageNotFoundError: Packages missing in current channels:

  - pygame

We have searched for the packages in the following channels:

  - https://conda.anaconda.org/anaconda-fusion/osx-64
  - https://conda.anaconda.org/anaconda-fusion/noarch
  - https://repo.continuum.io/pkgs/free/osx-64
  - https://repo.continuum.io/pkgs/free/noarch
  - https://repo.continuum.io/pkgs/r/osx-64
  - https://repo.continuum.io/pkgs/r/noarch
  - https://repo.continuum.io/pkgs/pro/osx-64
  - https://repo.continuum.io/pkgs/pro/noarch




## Installing pygame


Macbook-Pro:~ myname$ conda install -c https://conda.anaconda.org/quasiben pygame
Fetching package metadata .............
Solving package specifications: .

Package plan for installation in environment /Users/myname/anaconda:

The following NEW packages will be INSTALLED:

    pygame: 1.9.1-py27_1 quasiben

Proceed ([y]/n)? y


## Testing


Macbook-Pro:~ myname$ python -m pygame.examples.aliens
/Users/myname/anaconda/bin/python: dlopen(/Users/myname/anaconda/lib/python2.7/site-packages/pygame/base.so, 2): Library not loaded: /usr/local/lib/libSDL-1.2.0.dylib
  Referenced from: /Users/myname/anaconda/lib/python2.7/site-packages/pygame/base.so
  Reason: image not found
Macbook-Pro:~ myname$ 



## uninstall and re-install


Macbook-Pro:~ myname$ conda uninstall pygame
Fetching package metadata ...........
Solving package specifications: .

Package plan for package removal in environment /Users/myname/anaconda:

The following packages will be REMOVED:

    pygame: 1.9.1-py27_1 quasiben

Proceed ([y]/n)? y


## Trying to install a new way


Macbook-Pro:~ myname$ conda install -c kne pygame=1.9.2a0
Fetching package metadata .............
Solving package specifications: .

Package plan for installation in environment /Users/myname/anaconda:

The following NEW packages will be INSTALLED:

    pygame: 1.9.2a0-py27_0 kne

Proceed ([y]/n)? y

Macbook-Pro:~ myname$ python -m pygame.examples.aliens
/Users/myname/anaconda/bin/python: dlopen(/Users/myname/anaconda/lib/python2.7/site-packages/pygame/base.so, 2): Library not loaded: /usr/local/opt/sdl/lib/libSDL-1.2.0.dylib
  Referenced from: /Users/myname/anaconda/lib/python2.7/site-packages/pygame/base.so
  Reason: image not found
Macbook-Pro:~ myname$ 
user3476463
  • 3,967
  • 22
  • 57
  • 117

0 Answers0