How do I download Pygame for Python 3.5.1?

前端 未结 6 1597
醉梦人生
醉梦人生 2021-01-18 09:06

I am unable to find a pygame download for Python 3.5 and the ones I have downloaded don\'t seem to work when I import to the shell. Help?

This is the message I recei

6条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-18 09:23

    For windows now you simply use pip as it's available directly to install as pygame.

    Use the following command:

    python -m pip install pygame
    

    It should output something like this, then you can test if it's working by importing pygame.

    PS C:\Windows\system32> python -m pip install pygame
    Collecting pygame
      Downloading pygame-1.9.2b1-cp35-cp35m-win32.whl (4.4MB)
      100% |################################| 4.4MB 264kB/s
    Installing collected packages: pygame
    Successfully installed pygame-1.9.2b1
    PS C:\Windows\system32> python
    Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:01:18) [MSC v.1900 32 bit (Intel)] on win32
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import pygame
    # Note there is no error here...
    >>> quit()
    PS C:\Windows\system32>
    

提交回复
热议问题