0

I am trying to install Pygame, but I am very confused. On the pygame.org website, there is no version for 3.4, and when I download the correct file from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame I get a .whl file. Upon further investigation, I've come across another question like this: How to install PyGame on Python 3.4?

But when I try to run

pip install wheel
pip install pygame-1.9.2a0-cp34-none-win32.whl

I get an error:

SyntaxError: invalid syntax

And it highlights the "install" part of the code. Help?

Community
  • 1
  • 1
  • Yep, sorry, forgot that part. Still get SyntaxError... – python noob Nov 18 '15 at 20:59
  • Are you entering the pip commands *within the Python console*? – DSM Nov 18 '15 at 21:01
  • I have tried doing it in the shell and a file – python noob Nov 18 '15 at 21:03
  • That's a Python error message, though. `pip` needs to be run from the shell. (I don't know much about windows so I can't be of help on that side, but it definitely won't work from within Python.) – DSM Nov 18 '15 at 21:06
  • I believe you should be using `pip3 install wheel pygame-1.9.2a0-cp34-none-win32.whl` – wpercy Nov 18 '15 at 21:07
  • I have run it in the shell, command line, and from a file, and it still wont work – python noob Nov 18 '15 at 21:08
  • I still get SyntaxError: invalid syntax when I run that, and it highlights "install" – python noob Nov 18 '15 at 21:09
  • Try `py -m pip install wheel pygame-1.9.2a0-cp34-none-win32.whl` in your command prompt – wpercy Nov 18 '15 at 21:10
  • @pythonnoob: one more time for good luck. *If you are seeing the error message starting `SyntaxError:`, you are doing it from within the Python console.* That will never work. Stop doing it! Try it from within the shell, and edit your question to include a copy-paste of *that* error message. – DSM Nov 18 '15 at 21:13
  • @DSM Careful with the use of "shell", lots of people use that terminology for the python interpreter – wpercy Nov 18 '15 at 21:14
  • I am doing it from the shell! I have tried the command prompt, the python command line, the shell, and from a file!! – python noob Nov 18 '15 at 21:15
  • @wilbur I still get the same error – python noob Nov 18 '15 at 21:16
  • Also, by shell I mean the window that doesnt look like the command prompt (like on linux), I mean the window that opens with the menus etc – python noob Nov 18 '15 at 21:22
  • You need to run those commands *from the command prompt*. As has been said, you may need to use something like `pip3 install...` or `py -3 -m pip install...` if you have version of Python 2 installed. See also [this question](http://stackoverflow.com/questions/27885397/how-do-i-install-a-python-package-with-a-whl-file). – ig0774 Nov 18 '15 at 21:30
  • the python command line, or just the CMD? – python noob Nov 18 '15 at 21:31
  • Just regular cmd, something like `c:\>pip install wheel pygame-...` – ig0774 Nov 18 '15 at 21:31
  • "pip" is not recognized as an internal or external command, operable program or batch file. – python noob Nov 18 '15 at 21:33
  • by the way, the file is in my downloads folder, does this help? – python noob Nov 18 '15 at 21:35
  • If `pip` is not recognised, it is because it isn't on your PATH. It should be in the `Scripts` subfolder of wherever your Python 3.4 is installed (perhaps `C:\Python34\Scripts\pip.exe`). You'll have to use the fully-qualified path for pip from the cmd prompt: `C:\Python34\Scripts\pip.exe install...` – ig0774 Nov 18 '15 at 21:46

1 Answers1

0

If you go to the pygame bitbucket https://bitbucket.org/pygame/pygame/downloads there is a .msi for 32bit Python 3.4 pygame.

GoatsWearHats
  • 272
  • 1
  • 9
  • 17