[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Help me install PYgame on Python 3.3.3 IDLE

Posted on 2014-08-26
6
Medium Priority
?
628 Views
Last Modified: 2014-09-03
Hi

I like Python and pygame :) (pygame youtubes look sweet)
I want to use the current forefront language.
I have Python 3.3.3 working
It is just a console, shell, like Apple II e basic, not an IDE. ?
What is the best way to install pygame for 3.3.3 ?
There are os X releases on pygame.org,
but I don't want to find out the hard way I used the wrong download.
How should I proceed? How do they connect?

Thanks
0
Comment
Question by:beavoid
  • 3
  • 3
6 Comments
 

Author Comment

by:beavoid
ID: 40288185
This has Pygame, but version 1.9

here

Dont I want 2.2   ? for most recent add ons?
0
 
LVL 5

Expert Comment

by:Pasha Kravtsov
ID: 40288205
If you're on OS X you can use any IDE/text editor to create .py files.
Example:
vim game.py

Open in new window

Then enter a semi colon ':' and type wq which saves and exits the file now you have a python game file which you can either double click or run by doing "python game.py" in the terminal

To install pygame you should install easy_install which installs python libraries for you:
(Do these commands one by one in the terminal)
curl https://bootstrap.pypa.io/ez_setup.py -o - | python
python ez_setup.py
easy_install pygame

Open in new window

0
 

Author Comment

by:beavoid
ID: 40289568
Thanks

I seem to get :  

SyntaxError: invalid syntax

on those lines

How do I check to see if the Terminal is properly connected to python?
thx
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 5

Expert Comment

by:Pasha Kravtsov
ID: 40290589
Sorry, I should of been more clear for you to use the OS X terminal not the python terminal.
0
 

Author Comment

by:beavoid
ID: 40291862
Thanks

Insane . . .  I get

Last login: Thu Aug 28 22:31:52 on ttys001
Jamess-MacBook-Pro:~ johnhancock$ curl https://bootstrap.pypa.io/ez_setup.py -o - | python
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 10476  100 10476    0     0  10851      0 --:--:-- --:--:-- --:--:-- 18673
Downloading https://pypi.python.org/packages/source/s/setuptools/setuptools-5.7.zip
Extracting in /var/folders/1s/_bv1k86n2lq6ld9m00cb6l180000gn/T/tmpzSl211
Now working in /var/folders/1s/_bv1k86n2lq6ld9m00cb6l180000gn/T/tmpzSl211/setuptools-5.7
Installing Setuptools
running install
Checking .pth file support in /Library/Python/2.7/site-packages/
error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

    [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-1205.pth'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    /Library/Python/2.7/site-packages/

Perhaps your account does not have write access to this directory?  If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account.  If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.

For information on other options, you may wish to consult the
documentation at:

  https://pythonhosted.org/setuptools/easy_install.html

Please make the appropriate changes for your system and try again.

Something went wrong during the installation.
See the error message above.
Jamess-MacBook-Pro:~ jameshancock$ curl https://bootstrap.pypa.io/ez_setup.py -o - | python
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 10476  100 10476    0     0  17658      0 --:--:-- --:--:-- --:--:-- 52909
Extracting in /var/folders/1s/_bv1k86n2lq6ld9m00cb6l180000gn/T/tmpZDxjqc
Now working in /var/folders/1s/_bv1k86n2lq6ld9m00cb6l180000gn/T/tmpZDxjqc/setuptools-5.7
Installing Setuptools
running install
Checking .pth file support in /Library/Python/2.7/site-packages/
error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

    [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-1221.pth'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    /Library/Python/2.7/site-packages/

Perhaps your account does not have write access to this directory?  If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account.  If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.

For information on other options, you may wish to consult the
documentation at:

  https://pythonhosted.org/setuptools/easy_install.html

Please make the appropriate changes for your system and try again.

Something went wrong during the installation.
See the error message above.
Jamess-MacBook-Pro:~ jameshancock$ easy_install pygame
error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

    [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-1229.write-test'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    /Library/Python/2.7/site-packages/

Perhaps your account does not have write access to this directory?  If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account.  If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.

For information on other options, you may wish to consult the
documentation at:

  http://peak.telecommunity.com/EasyInstall.html

Please make the appropriate changes for your system and try again.

Jamess-MacBook-Pro:~ jameshancock$ 

Open in new window


In System Preferences, I have administrator rights, and I can't see why it wont let me install.
Ideas?

Thanks
0
 
LVL 5

Accepted Solution

by:
Pasha Kravtsov earned 2000 total points
ID: 40293038
Try:
curl https://bootstrap.pypa.io/ez_setup.py -o - | sudo python

Open in new window

0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

"The time has come," the Walrus said, "To talk of many things: Of sets--and lists--and dictionaries-- Of variable kinks-- And why you see it changing not-- And why so strange are strings." This part describes how variables and references (see …
Variable is a place holder or reserved memory locations to store any value. Which means whenever we create a variable, indirectly we are reserving some space in the memory. The interpreter assigns or allocates some space in the memory based on the d…
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
Suggested Courses

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question