我正在尝试在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~)
我该怎么办?
答案 0 :(得分:0)
想出来。找到一个终端命令来重新安装python:
sudo apt-get purge python && sudo apt-get install python2.7
答案 1 :(得分:-1)
sudo apt-get install -f
它修复了损坏的依赖项