为python2.7安装pygtk模块

时间:2014-04-05 01:15:53

标签: python python-2.7 pygtk

我的操作系统是CentOS 6,默认包含python 2.6.6。我在/ usr / local / .....

中安装了python 2.7

我试图首先使用pip来安装pygtk,但它没有用。所以我决定手动安装它。我用:

./configure --prefix=/usr/local/lib/python2.7/site-packages

错误消息显示默认版本是python 2.6.6,它试图安装在/usr/local/lib/python2.6 / ...当然不会退出。我还将python的别名定义为python2.7,所以当我输入python时,它会假设它是python2.7。但这里没有这种方式。有什么建议?谢谢!

BTW:我用pip安装pygtk时的错误信息是:

命令python setup.py egg_info失败,错误代码为1 / tmp / pip_build_root / pygtk

在/root/.pip/pip.log中存储失败的调试日志

异常信息:

Traceback (most recent call last):

File "/usr/local/lib/python2.7/site-packages/pip-1.5.4-py2.7.egg/pip/basecommand.py", line 122, in main status = self.run(options, args)

File "/usr/local/lib/python2.7/site-packages/pip-1.5.4-py2.7.egg/pip/commands/install.py", line 278, in run requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)

File "/usr/local/lib/python2.7/site-packages/pip-1.5.4-py2.7.egg/pip/req.py", line 1229, in prepare_files req_to_install.run_egg_info()

File "/usr/local/lib/python2.7/site-packages/pip-1.5.4-py2.7.egg/pip/req.py", line 325, in run_egg_info command_desc='python setup.py egg_info')

File "/usr/local/lib/python2.7/site-packages/pip-1.5.4-py2.7.egg/pip/util.py", line 697, in call_subprocess % (command_desc, proc.returncode, cwd)) InstallationError: Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/pygtk

0 个答案:

没有答案