繁体   English   中英

在Ubuntu上安装pygame

[英]Installing pygame on ubuntu

我正在尝试在Ubuntu 16.04系统上安装pygame。 我的默认python是2.7.12。 我打开终端并尝试:

sudo apt-get install python-pygame

我收到此消息:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 python-pygame : Depends: python-numpy (>= 1:1.8.0) but it is not going to be installed
                 Depends: python-numpy-abi9
E: Unable to correct problems, you have held broken packages.

然后,我尝试安装numpy并收到以下消息:

The following packages have unmet dependencies:
 python-numpy : Depends: python:any (>= 2.7.5-5~)

我该怎么办?

弄清楚了。 找到一个终端命令来重新安装python:

sudo apt-get purge python && sudo apt-get install python2.7
sudo apt-get install -f

它修复了损坏的依赖关系

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM