19

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.

john-hen
  • 4,410
  • 2
  • 23
  • 40
nedla2004
  • 1,115
  • 3
  • 14
  • 29
  • Have you tried following their installation instructions? http://www.pygame.org/wiki/GettingStarted – jonrsharpe May 09 '16 at 21:37
  • https://bitbucket.org/pygame/pygame – Padraic Cunningham May 09 '16 at 21:39
  • 3
    I'm voting to close this question as off-topic because Pygame is not hosted on pypi and any answer here would restate installation process which is documented elsewhere. – Tadhg McDonald-Jensen May 10 '16 at 17:42
  • @TadhgMcDonald-Jensen although I'm not sure this is on-topic, it's certainly NOT off-topic because the answer is "documented elsewhere." Unless that "elsewhere" is already on Stack Overflow (in which case this is a dupe), it's irrelevant. – Adam Smith May 10 '16 at 18:25
  • Turns out it IS a dupe. The question boils down to "How can I install pygame" not "Why is pip telling me it can't find a version that satisfies the requirement " – Adam Smith May 10 '16 at 18:28
  • 2
    @AdamSmith every single answer on that question is basically link only. The close reason of "asking to find a off-site resource" is meant to prevent these kinds of questions, but it was not completely valid for this one since that was not quite what the op was asking. – Tadhg McDonald-Jensen May 10 '16 at 18:32
  • I agree that "documented elsewhere" was not the best choice of words but I still feel that this and the one you marked this as a dup of are off topic for SO. – Tadhg McDonald-Jensen May 10 '16 at 18:33
  • 1
    @TadhgMcDonald-Jensen "basically link only" isn't "link only." The accepted answer is decidedly *not* a link-only answer. I agree this isn't a good question, but it is answerable and there is a dupe target for it. This is far better than closing as off-topic. – Adam Smith May 10 '16 at 18:40

1 Answers1

8

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
smac89
  • 39,374
  • 15
  • 132
  • 179
  • Thank you, however when I try to install "pygame-1.9.2a0.win32-py3.2.msi" I cannot import PyGame in Python, and I cannot find a .whl file on the PyGame download site. – nedla2004 May 09 '16 at 21:49
  • 1
    @nedla2004, Note that you downloaded the one that works with python 3.2, so make sure you are using python 3.2. If that doesn't fix it, get the `.whl` file from [here](http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame) – smac89 May 09 '16 at 21:51
  • When I try 'pygame-1.9.2a0-cp35-none-win_amd64.whl' it says 'pygame-1.9.2a0-cp35-none-win_amd64.whl is not a supported wheel on this platform' and when I try'pygame-1.9.2a0-cp35-none-win32.whl' it seems like it worked, but when I try `import pygame` on the Python shell, it says `Traceback (most recent call last): File "", line 1, in import pygame ImportError: No module named 'pygame'` – nedla2004 May 10 '16 at 13:08
  • what is a `wheel`? – Madivad Apr 19 '19 at 01:47
  • 1
    @Madivad https://pythonwheels.com/. Essentially, they are a way of packaging python projects for easy installation with a package manager such as pip. – smac89 Apr 19 '19 at 02:17