使用pip安装pygame时出错 [英] Error with installing pygame with pip
问题描述
以下是在树莓派上运行命令sudo python -m pip install pygame
时的精确输出:
The following is the EXACT output when running the command sudo python -m pip install pygame
on raspberry pi:
Collecting pygame
Using cached pygame-1.9.3.tar.gz
Complete output from command python setup.py egg_info:
WARNING, No "Setup" File Exists, Running "config.py"
Using UNIX configuration...
Hunting dependencies...
SDL : found 1.2.15
FONT : found
IMAGE : found
MIXER : found
PNG : found
JPEG : found
SCRAP : found
PORTMIDI: not found
PORTTIME: not found
FREETYPE: found 2.5.2
Missing dependencies
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-nOupZN/pygame/
我尝试以不使用pip的方式安装pygame,但所有方法都以其他方式失败,我认为此问题可能是最容易修复的.我不在乎缺少的依赖项.我知道错误代码1是不允许操作"错误,但是我确实使用了sudo
,所以我不知道为什么会这样.对于太多的代码我深表歉意,但我想提供尽可能多的信息.我不知道问题出在哪里,但是如果有人能帮忙,那将是救生员.
I have tried installing pygame in ways without using pip but all of them fail in other ways and I think this problem may be the easiest to fix. I don't mind the missing dependencies. I know error code 1 is "operation not permitted" error, but i did use sudo
, so I don't know why this comes up. I apologize for having so much code, but I wanted to provide as much information as possible. I have no idea what the problem is, but if anyone can help it would be a lifesaver.
注意:
- 输出的最后一行在外壳中以红色文本显示
-
nOupZN
可能只是随机的;我尝试安装多次,并且每次都会更改该部分
- The last line of the output appears in red text in the shell
nOupZN
is probably just random; I've tried installing multiple times and that part changes each time
推荐答案
sudo apt-get install python3-pygame
我一直在努力学习在Pi上安装东西的正确方法.我刚刚从去年开始学习,对linux来说是相当新的东西.我一直在大多数时间都使用这种技术.
I've been struggling to learn the right way to install stuff on my Pi too. I've just started this past year, and pretty much new to linux. I've converged on this technique working most of the time.
这篇关于使用pip安装pygame时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
-