Install pygame on windows - python

I am using windows 8.1 with python 3.4 installed. I want to install pygame on my computer. I download pygame-1.9.2a0-cp34-none-win_amd64.whl and try to install it like this
C:\Users\hp pc\Downloads>pip install pygame-1.9.2a0-cp34-none-win_amd64.whl
but it shows an error like this
pygame-1.9.2a0-cp34-none-win_amd64.whl is not a supported wheel on this platform
Is it a problem with my windows?
Kindly help me to fix it if there is any way to fix it.

Hi I had the same problems. I Just used the normal pygame download (http://www.pygame.org/download.shtml) and it worked just fine despite not being 64bit
Here is a link a link for the unafishal download that may have what you are looking for: http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame
hope you can get it to work for you (-:

I had this problem also on my "windows 8 64bit" with the 64 bit version of pygame. Which only runs on a 64bit python installation, I had at one time or another installed both versions.
To fix it I had to uninstall then reinstall the 64 bit Python and get it from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame
Then I followed this guide for Installing the Windows 64-bit Version of Pygame
then I installed the wheel on windows 8 you need to remember to use the full path and 3.4 already had pip included
c:\python34\scripts\pip install c:\python34\scripts\pygame-1.9.2a0-cp34-none-win_amd64.whl

Related

Unable to use package after installing [duplicate]

So I have this little problem. When I try to install Pygame for Python 3.4 I download a .whl (wheel?) file and don't know how to use it. Some guys told me something about pip but don't know how to use/install it.
You can install the wheel file for Python 3.4 here:
First you have to install the wheel package from pip then install Pygame.
pip install wheel
pip install pygame‑1.9.2a0‑cp34‑none‑win_amd64.whl
Here's a video to help you install pip on Youtube.
Here is a great VIDEO tutorial: http://goo.gl/PurJqk (it is on youtube)
This is what I use to install .whl modules to python (I do this in the 64 bit windows cmd):
cd "C:\Users\(YOUR USERNAME)\Desktop"
(assuming that you have the .whl file on your desktop)
C:\Python34\Scripts\pip install filename.whl
(where filename.whl is the full name of the .whl file, with the .whl extension)
After that it will install, and you are free to use PyGame!
14 y/o? Good for you! You can put the file into your python/scripts folder and run pip install *file* (where *file* is your filename).
Here is a link to download pygame for different versions of Python, up to Python 3.4 in 32 bit and 64 bit.
To test if it installed properly, open your python shell and type in this code:
import pygame
Please note that these are not official binaries and you are basically trusting a third-party to compile and provide the binary for you.
Step 1
If you have not got python version 3.4.2, then you must uninstall your current version of python (or don't if you don't even have python).
Step 2
Then download and install python 3.4.2 from http://filehippo.com/download_python/58901/ .
Step 3
Follow the instructions and wait until it is ready for use.
Step 4
Now download the 'pygame-1.9.2a0-cp34-none-win32.whl' file from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame and copy it into C:\Python34\Scripts .
Step 5
In C:\Python34\Scripts hold the shift key and right click. Click on 'Open new command window here'.
Step 6
In the command window you have opened, type in:
pip3 install pygame-1.9.2a0-cp34-none-win32.whl
It will say something like:
Unpacking C:\Python34\Scripts\pygame-1.9.2a0-cp34-none-win32.whl
Installing collected packages: pygame
Successfully installed pygame
Cleaning up...
And it will then just say C:\Python34\Scripts>, which means that pygame has now been installed!
Step 7
Go to the Python 3.4.2 Shell, and type in:
import pygame
if there is an error, pygame didn't install properly, otherwise, congratulations!
You can then:
import pygame.examples.aliens as game
and then on the next line type in:
game.main()
to see a professional pygame example.
For more information, visit my website at:
https://ronaldobutrus.github.io/Site3/index.html
Good Luck! :)
https://bitbucket.org/pygame/pygame/downloads
"pygame-1.9.2a0-hg_5974ff8dae3c+.win32-py3.4.msi"
This is the package you want, RedNax said this but did not point out the exact package.
The other answer doesn't work for me on Windows 10 Pro N x64.
What did work was installing the win32.whl instead of amd64. I put this in my Python3.4\Scripts folder where pip is and ran
pip install pygame-1.9.2a0-cp34-none-win32.whl
This should work for others using a similar configuration.
In my experience, you need to make sure of two things:
1) Both Python and Pygame should be 32 bit - not either or both being 64 bit.
2) Both Python and Pygame should be compatible for the same version.
You may be able to get the 64 bit version to work, but not all packages have migrated to 64 bit and the small performance improvement isn't worth the frustration of trying to get it to work.
I also found the latest 32 bit Pygame (as of Feb. 5th, 2016) seems to work well with 32 bit Python 3.4.4.
I installed 32 bit python-3.4.4.msi on Windows 10 from my downloads folder to the folder C:\Python34.
Within the Python34 folder, I created a folder called "Project Directory".
In it, I placed "pygame-1.9.2a0-hg_ea3b3bb8714a.win32-py3.4.msi" which I think I got from https://bitbucket.org/pygame/pygame/downloads. Double-clicked on it. Worked the first time.
I had also installed "Microsoft Visual Studio Community 2015 with Update 1."
No idea if this helped solve the problem, but this MVSC package installs a lot of DLLs. It takes quite a while to get MVSC installed.
But - I now have Pygame working on Windows 10.
For linux if you root user then copy paste this into terminal
apt-get install python3-dev mercurial
apt-get install libsdl-image1.2-dev libsdl2-dev libsdl-ttf2.0-dev
apt-get install libsdl-mixer1.2-dev libportmidi-dev
apt-get install python-numpy
pip3 install --user hg+http://bitbucket.org/pygame/pygame
If you not root user then use sudo before start every-line.

Pygame for Python 3.5.1 (Nothing I've tried has worked)

I've been trying to install pygame for Python 3.5.1 on Windows 10, 64 bit. Everything I've attempted so far has resulted in an error message in some form.
My latest attempt has been when I downloaded pygame-1.9.2a0-cp35-none-win_amd64.whl (also tried the 32-bit, got same error) from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame and dragged the .whl file into Python35-32/Scripts. I then proceeded to go to command prompt and do the pip install thing, to which I got this message:
"Could not find a version that satisfies the requirement pygame-1.9.2a0-cp35-none-win_amd64 (from versions: )
No matching distribution found for pygame pygame-1.9.2a0-cp35-none-win_amd64"
I am aware that I may be installing it incorrectly, but from my understanding of other guides, this is what they say to have done. I would greatly appreciate help if possible.
It sounds like you've left the file extension off of the filename when you're calling pip install. Make sure you include the .whl extension, of pip will think the file name is the name of a package it should be downloading for you.
Pygame is not compatible with python 3.5. But it is with python 3.4. You can find binaries at: https://bitbucket.org/pygame/pygame/downloads
For previous version of python: https://www.python.org/downloads/
The first thing to check is that you have the 64 bit version of Python (the default windows download is 32bit). If not, here's the link:
https://www.python.org/downloads/release/python-360/
When you have the 64 bit python going, From the command prompt / Powershell, use "pip install pygame" or "python -m pip install pygame" then you will be sure the os, python, and pygame are all 64bit, mixing and matching doesn't work.

Installing Pygame on 64bit Windows with Python 3.4

I've downloaded the pygame-1.9.2a0-cp34-none-win_amd64.whl file and attempted to install it by doing the following:
Place in same directory as command prompt's default (C:\Users\NAME)
Type pip install pygame-1.9.2a0-cp34-none-win_amd64.whl in cmd
It throws the error pygame-1.9.2a0-cp34-none-win_amd64.whl is not a supported wheel on this platform.
I've heard that you have to install the 32-bit version of Python to install Pygame, but that seems like a huge pain and I'd rather not have more headaches after hours of attempting to install Pygame.
I have 64-bit Windows 8.1 Pro and Python 3.4.3. How can I install Pygame?
I think this should help
https://www.webucator.com/blog/2015/03/installing-the-windows-64-bit-version-of-pygame/
Although the Kiwi might be more interesting for you.
http://kivy.org

How to install Pygame on Python 3.4?

So I have this little problem. When I try to install Pygame for Python 3.4 I download a .whl (wheel?) file and don't know how to use it. Some guys told me something about pip but don't know how to use/install it.
You can install the wheel file for Python 3.4 here:
First you have to install the wheel package from pip then install Pygame.
pip install wheel
pip install pygame‑1.9.2a0‑cp34‑none‑win_amd64.whl
Here's a video to help you install pip on Youtube.
Here is a great VIDEO tutorial: http://goo.gl/PurJqk (it is on youtube)
This is what I use to install .whl modules to python (I do this in the 64 bit windows cmd):
cd "C:\Users\(YOUR USERNAME)\Desktop"
(assuming that you have the .whl file on your desktop)
C:\Python34\Scripts\pip install filename.whl
(where filename.whl is the full name of the .whl file, with the .whl extension)
After that it will install, and you are free to use PyGame!
14 y/o? Good for you! You can put the file into your python/scripts folder and run pip install *file* (where *file* is your filename).
Here is a link to download pygame for different versions of Python, up to Python 3.4 in 32 bit and 64 bit.
To test if it installed properly, open your python shell and type in this code:
import pygame
Please note that these are not official binaries and you are basically trusting a third-party to compile and provide the binary for you.
Step 1
If you have not got python version 3.4.2, then you must uninstall your current version of python (or don't if you don't even have python).
Step 2
Then download and install python 3.4.2 from http://filehippo.com/download_python/58901/ .
Step 3
Follow the instructions and wait until it is ready for use.
Step 4
Now download the 'pygame-1.9.2a0-cp34-none-win32.whl' file from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame and copy it into C:\Python34\Scripts .
Step 5
In C:\Python34\Scripts hold the shift key and right click. Click on 'Open new command window here'.
Step 6
In the command window you have opened, type in:
pip3 install pygame-1.9.2a0-cp34-none-win32.whl
It will say something like:
Unpacking C:\Python34\Scripts\pygame-1.9.2a0-cp34-none-win32.whl
Installing collected packages: pygame
Successfully installed pygame
Cleaning up...
And it will then just say C:\Python34\Scripts>, which means that pygame has now been installed!
Step 7
Go to the Python 3.4.2 Shell, and type in:
import pygame
if there is an error, pygame didn't install properly, otherwise, congratulations!
You can then:
import pygame.examples.aliens as game
and then on the next line type in:
game.main()
to see a professional pygame example.
For more information, visit my website at:
https://ronaldobutrus.github.io/Site3/index.html
Good Luck! :)
https://bitbucket.org/pygame/pygame/downloads
"pygame-1.9.2a0-hg_5974ff8dae3c+.win32-py3.4.msi"
This is the package you want, RedNax said this but did not point out the exact package.
The other answer doesn't work for me on Windows 10 Pro N x64.
What did work was installing the win32.whl instead of amd64. I put this in my Python3.4\Scripts folder where pip is and ran
pip install pygame-1.9.2a0-cp34-none-win32.whl
This should work for others using a similar configuration.
In my experience, you need to make sure of two things:
1) Both Python and Pygame should be 32 bit - not either or both being 64 bit.
2) Both Python and Pygame should be compatible for the same version.
You may be able to get the 64 bit version to work, but not all packages have migrated to 64 bit and the small performance improvement isn't worth the frustration of trying to get it to work.
I also found the latest 32 bit Pygame (as of Feb. 5th, 2016) seems to work well with 32 bit Python 3.4.4.
I installed 32 bit python-3.4.4.msi on Windows 10 from my downloads folder to the folder C:\Python34.
Within the Python34 folder, I created a folder called "Project Directory".
In it, I placed "pygame-1.9.2a0-hg_ea3b3bb8714a.win32-py3.4.msi" which I think I got from https://bitbucket.org/pygame/pygame/downloads. Double-clicked on it. Worked the first time.
I had also installed "Microsoft Visual Studio Community 2015 with Update 1."
No idea if this helped solve the problem, but this MVSC package installs a lot of DLLs. It takes quite a while to get MVSC installed.
But - I now have Pygame working on Windows 10.
For linux if you root user then copy paste this into terminal
apt-get install python3-dev mercurial
apt-get install libsdl-image1.2-dev libsdl2-dev libsdl-ttf2.0-dev
apt-get install libsdl-mixer1.2-dev libportmidi-dev
apt-get install python-numpy
pip3 install --user hg+http://bitbucket.org/pygame/pygame
If you not root user then use sudo before start every-line.

Python error when installing package using wheel files

I am trying to install pyHook with a wheel file (.whl) but for some reason it keeps giving me this error:
pyHook-1.5.1-cp34-none-win_amd64.whl is not a supported wheel on this platform.
I got the wheel file from this website:
http://www.lfd.uci.edu/~gohlke/pythonlibs/
The command I use is:
pip install pyHook-1.5.1-cp34-none-win_amd64.whl
I have no idea what to do, I cant find any suggestions.
Python version 2.7
pip version 6.0.6
You are installing a Wheel created for Python 3.4, into Python 2.7. That won't work. Use the correct version and download the one with cp27 in the name:
pyHook‑1.5.1‑cp27‑none‑win_amd64.whl
I ran into the same issues whilst trying to install pyhook on Python 3.4. I downloaded the correct version from python software foundation.
I had to manually change the name of the file from pyHook_3k_compiled-1.5.1-cp34-cp34m-win_amd64.whl to pyHook-1.5.1-cp34-none-win_amd64.whl.
pip install pyHook-1.5.1-cp34-none-win_amd64.whl
And it worked!
You may not have installed the correct one for your operating system check whether it is the 32 bit or 64 bit variant and install it again

Categories

Resources