1

Sorry, thought i edited to say i am on windows 64 bit When trying to install Pygame using pip, I get the following error:

"requirement 'pygame.whl' looks like a file name, but the file does not exist pygame.whl is not a valid wheel filename."

I have my file paths right and pip is working. I have attempted to install 32 bit and 64 bit pygame but neither is working. In the command prompt I enter "pip install pygame.whl" (I renamed the file which I don't think should matter and it is saved under downloads).

How can I resolve this error?

Zannith
  • 429
  • 4
  • 21

2 Answers2

0

It seems there is no PyPi package for pygame. On Ubuntu / Debian you should be able to simply do:

sudo apt-get install python-pygame

Should be similar for other package managers on other distros.

On windows, use the download the provided installer:

ventsyv
  • 3,316
  • 3
  • 27
  • 49
  • i'm looking under pypi installation and it shows two downloads one compatible for python 2.7 and one for python 3.2. will it work with python 3.4? or is there a download i should look elsewhere for? – Zannith Mar 11 '15 at 21:54
  • There are major differences between Python 2.x and 3.x, but the version for python 3.2 should work just fine with 3.4. – ventsyv Mar 12 '15 at 15:06
  • turns out there has been a lot of issues with the pip,pygame,pypi combination. apparently there may be a fix coming, but don't know when. is there another way to install pygame? – Zannith Mar 12 '15 at 16:33
  • See my answer above. You don't have to use pip at all, you can install a package native to your distro. I'm assuming this is on Linux, right? – ventsyv Mar 12 '15 at 17:16
  • windows 8.1 it says in my post, 64 bit – Zannith Mar 12 '15 at 21:24
  • and using 32 bit python if that changes anything – Zannith Mar 12 '15 at 21:25
  • Download the installer from pygame's website. See the update answer above. – ventsyv Mar 12 '15 at 21:35
  • btw thankyou for sticking with me through this, one day i will have the hang of all this lol. But still having problems. i downloaded the 1.9.2 pygame 32 bit and all. it put a folder called lib and include in my downloads which has pygame in it. what do i need to do with this from there? – Zannith Mar 13 '15 at 04:36
  • Make sure you download the .msi or .exe file that are in the "Windows" section, not the source code. Run that file, it will start a wizard that will guide you through the installation. Once that's done, start python, and type "import pygame" to verify that it was installed correctly. – ventsyv Mar 13 '15 at 17:08
  • downloaded the .msi file in windows section, went through the installer. opened up my ide and used import pygame, still not working tried erasing all pygame folders and redownloading, still nothing. just says no module named 'pygame' – Zannith Mar 14 '15 at 05:04
  • update, i moved the files from downloads to my python34 folder. if i do pip install pygame it says it is already satisfied. now when i try to import i get the following error. File "C:\Python34\Lib\site-packages\pygame\__init__.py", line 95, in from pygame.base import * builtins.ImportError: DLL load failed: The specified module could not be found. – Zannith Mar 14 '15 at 05:10
0

Thankyou so much for your help ventsyv, i finally figured it out. i believe it was an issue with the installer from pygames site. i found another site with a link to pygame and specifically for python 3.4.2. i now have no error messages and its working great. Thanks for putting up with me haha.

Zannith
  • 429
  • 4
  • 21