Can't install pygame with pip for Python 3.7 - Command “python setup.py egg_info” failed with error code 1

前端 未结 2 932
长情又很酷
长情又很酷 2020-12-19 11:58

I get the below error when trying to install pygame with pip:

Command \"python setup.py egg_info\" failed with error code 1 in 
C:\\Users\\danie\\AppData\\L         


        
相关标签:
2条回答
  • 2020-12-19 12:16

    Try :

    py -3.7 -m pip install pygame
    
    0 讨论(0)
  • 2020-12-19 12:23

    Update: Pygame 1.9.4 has been released and you can download and install it with pip again. In Windows I recommend installing it with: py -3.7 -m pip install pygame


    There are no official precompiled pygame packages for Python 3.7 available yet, so pip install pygame doesn't work, but you can get a pygame wheel from: https://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame

    Download pygame‑1.9.3‑cp37‑cp37m‑win_amd64.whl if you have a 64-bit Python version or pygame‑1.9.3‑cp37‑cp37m‑win32.whl if you have a 32-bit version. Then open the command-line, navigate to the directory that contains the wheel file and install it with pip:

    py -3.7 -m pip install pygame‑1.9.3‑cp37‑cp37m‑win_amd64.whl
    

    This solution works only in Windows, so users with other operating systems have to wait and use Python 3.6.

    0 讨论(0)
提交回复
热议问题