Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pip "Could not find a version that satisfies the requirement pygame" [duplicate]

Tags:

python

pip

When I try to install PyGame with:pip install pygame it says

Collecting pygame

Could not find a version that satisfies the requirement pygame (from versions: )
No matching distribution found

I believe that I am using the most recent version, 8.1.1. I am using Python 3.5.1, on Windows 8.1. I have looked at other answers for this problem and none worked for me. Thanks for any help.

like image 685
nedla2004 Avatar asked May 09 '16 21:05

nedla2004


1 Answers

Update: Pygame >=1.9.2 should be installable via pip...

...for the major platforms (Windows included).

According to the Getting Started guide, the steps for installation should be as simple as what the OP had attempted (way back in 2016):

pip install --user pygame

After installation, you can check if it was installed correctly by running one of the examples:

python -m pygame.examples.aliens

Why didn't this work before?

I was kinda curious as to why the OP was unable to install pygame back when this question was asked, so I looked into the history of pygame releases on pypi and noticed that the latest version available as of May 2016 would have been version 1.8.1, which was released in 2008 (yikes).

Not only that, but it didn't have any installable wheels, which explains why the OP contains that error from pip about being unable to find any versions to download.

Previous Answer (Still kinda relevant)

pygame is not distributed via pip. See this link which provides windows binaries ready for installation (but only for pygame versions less than 2.0.0)

...Or follow the following instructions for manual installation of pygame (version 1.9.4 and higher)

  1. Install python
  2. Make sure you have python on your PATH
  3. Download the appropriate wheel from this link
  4. Install pip using this tutorial
  5. Finally, use these commands to install pygame wheel with pip
  • Python 2 (usually called pip)

    • pip install file.whl
  • Python 3 (usually called pip3)

    • pip3 install file.whl
like image 121
smac89 Avatar answered Oct 23 '22 16:10

smac89