安装pygame时出现问题

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
小草帽boy
帖子: 16
注册时间: 2017-12-29 1:12
系统: linux

安装pygame时出现问题

#1

帖子 小草帽boy » 2018-03-13 0:36

我使用的是python3.5.2,按照书上的步骤安装完pip后,然后用pip安装pygame时出现了以下错误

wuzsh5@wuzsh5-X555UJ:/home/YaH3C$ pip install --user hg+http://bitbucket.org/pygame/pygame
Collecting hg+http://bitbucket.org/pygame/pygame
Cloning hg http://bitbucket.org/pygame/pygame to /tmp/pip-0s9a07_g-build
abort: couldn't find mercurial libraries in [/usr/bin /usr/local/lib/python3.5.2/site-packages /usr/lib/python35.zip /usr/lib/python3.5 /usr/lib/python3.5/plat-x86_64-linux-gnu /usr/lib/python3.5/lib-dynload /home/wuzsh5/.local/lib/python3.5/site-packages /usr/local/lib/python3.5/dist-packages /usr/lib/python3/dist-packages]
(check your install and PYTHONPATH)
Command "hg clone --noupdate -q http://bitbucket.org/pygame/pygame /tmp/pip-0s9a07_g-build" failed with error code 255 in None

求问如何解决???

一开始以为是mercurial的问题
就打算重新安装一下mercurial

wuzsh5@wuzsh5-X555UJ:/home/YaH3C$ sudo apt-get install python3-dev mercurial
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
python3-dev 已经是最新版 (3.5.1-3)。
mercurial 已经是最新版 (3.7.3-1ubuntu1)。
下列软件包是自动安装的并且现在不需要了:
libllvm4.0
使用'sudo apt autoremove'来卸载它(它们)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 3 个软件包未被升级。

但显示它是最新版.
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 安装pygame时出现问题

#2

帖子 poloshiao » 2018-03-13 9:59

abort: couldn't find mercurial libraries in [/usr/bin /usr/local/lib/python3.5.2/site-packages /usr/lib/python35.zip /usr/lib/python3.5 /usr/lib/python3.5/plat-x86_64-linux-gnu /usr/lib/python3.5/lib-dynload /home/wuzsh5/.local/lib/python3.5/site-packages /usr/local/lib/python3.5/dist-packages /usr/lib/python3/dist-packages]
(check your install and PYTHONPATH)
看看 這一篇 能否幫上忙
https://serverfault.com/questions/23471 ... path-error
Cannot install mercurial properly - PYTHONPATH error
小草帽boy
帖子: 16
注册时间: 2017-12-29 1:12
系统: linux

Re: 安装pygame时出现问题

#3

帖子 小草帽boy » 2018-03-14 15:54

poloshiao 写了:
abort: couldn't find mercurial libraries in [/usr/bin /usr/local/lib/python3.5.2/site-packages /usr/lib/python35.zip /usr/lib/python3.5 /usr/lib/python3.5/plat-x86_64-linux-gnu /usr/lib/python3.5/lib-dynload /home/wuzsh5/.local/lib/python3.5/site-packages /usr/local/lib/python3.5/dist-packages /usr/lib/python3/dist-packages]
(check your install and PYTHONPATH)
看看 這一篇 能否幫上忙
https://serverfault.com/questions/23471 ... path-error
Cannot install mercurial properly - PYTHONPATH error
里面的方法都试过了,没有解决问题
fuhuizn
帖子: 948
注册时间: 2006-01-06 22:55
系统: ubuntu
联系:

Re: 安装pygame时出现问题

#4

帖子 fuhuizn » 2018-03-18 19:41

pip3 install Pygame
说实话没看懂你的命令,我用上面的命令轻松装上了。
装pip好像是:
apt-get install python3-pip
软件源源外的软件不要乱装,有很多兼容性问题
回复