针对pip install pygame安装报错的两种不同的解决方法:
一:若python中已经安装好了pip,但pip install pygame却报错的话,可以尝试以下步骤:
(1)开始,输入cmd
(2)pip install wheel
(3)pip install pygame
二:另一种出现错误的原因是版本问题,此时下载pygame会出现以下警告:
error: could not find a version that satisfies the requirement pygeme (from versions: none)
error: no matching distribution found for pygeme
warning: you are using pip version 21.2.4; however, version 23.1 is available.
you should consider upgrading via the 'c:\users\jih\appdata\local\programs\python\python310\python.exe -m pip install --upgrade pip' command.
针对这种问题,我们只需要把警告引号里面的内容复制下来就可以了,即:
c:\users\jih\appdata\local\programs\python\python310\python.exe -m pip install --upgrade pip
最后,我们就可以成功安装pygame了:
发表评论