I tried: c:/python34/scripts/pip install http://bitbucket.org/pygame/pygame
and got this error:
Cannot unpack file C:\Users\Marius\AppData\Local\Temp\pip-b60d5tho-unpack\pygame
(downloaded from C:\Users\Marius\AppData\Local\Temp\pip-rqmpq4tz-build, conte
nt-type: text/html; charset=utf-8); cannot detect archive format
Cannot determine archive format of C:\Users\Marius\AppData\Local\Temp\pip-rqmp
q4tz-build
Please if anyone have any solutions please feel free to share them!
I also tried
pip install --allow-unverified
, but that gave me an error as well.
The Python "ModuleNotFoundError: No module named 'pygame'" occurs when we forget to install the pygame module before importing it or install it in an incorrect environment. To solve the error, install the module by running the pip install pygame command.
The best way to install pygame is with the pip tool (which is what python uses to install packages). Note, this comes with python in recent versions. We use the --user flag to tell it to install into the home directory, rather than globally.
Python doesn't support Pygame.
This is the only method that works for me.
pip install pygame==1.9.1release --allow-external pygame --allow-unverified pygame
--
These are the steps that lead me to this command (I put them so people finds it easily):
$ pip install pygame
Collecting pygame
Could not find any downloads that satisfy the requirement pygame
Some externally hosted files were ignored as access to them may be unreliable (use --allow-external pygame to allow).
No distributions at all found for pygame
Then, as suggestes I allow external:
$ pip install pygame --allow-external pygame
Collecting pygame
Could not find any downloads that satisfy the requirement pygame
Some insecure and unverifiable files were ignored (use --allow-unverified pygame to allow).
No distributions at all found for pygame
So I also allow unverifiable:
$ pip install pygame --allow-external pygame --allow-unverified pygame
Collecting pygame
pygame is potentially insecure and unverifiable.
HTTP error 400 while getting http://www.pygame.org/../../ftp/pygame-1.6.2.tar.bz2 (from http://www.pygame.org/download.shtml)
Could not install requirement pygame because of error 400 Client Error: Bad Request
Could not install requirement pygame because of HTTP error 400 Client Error: Bad Request for URL http://www.pygame.org/../../ftp/pygame-1.6.2.tar.bz2 (from http://www.pygame.org/download.shtml)
So, after a visit to http://www.pygame.org/download.shtml, I thought about adding the version number (1.9.1release is the currently stable one).
--
Hope it helps.
If you get trouble when install pygame error about missing visual studio 10+. I have the answer:
The problem is not about have or not have visual studio, because I try many version but it not work. The problem is file: between tar.gz
and .whl
so, this is the solution:
1) Download file:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame
Go here and download your pygame version, notice about x64 or x86 and python version. My system is x64 and python is 3.4 so I choose: pygame-1.9.2a0-cp34-none-win_amd64.whl
2) Put it in some where to install:
I put it in "C:", so open cmd: and type: cd C:\ (this is change location to C:)
3) Install
pip install C:\pygame-1.9.2a0-cp34-none-win_amd64.whl
Done !
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With