Python版本冲突。 Jhbuild没有阅读Jhbuildrc?

问题描述:

我正要为gtk + 3设置pygobject。这http://python-gtk-3-tutorial.readthedocs.org/en/latest/install.html#id2页说我需要Jhbuild。我继续安装。但是,它给了我回溯Python版本冲突。 Jhbuild没有阅读Jhbuildrc?

Traceback (most recent call last): 
    File "/usr/bin/jhbuild", line 6, in <module> 
    import __builtin__ 
ImportError: No module named '__builtin__' 

这显然是由于错误版本的Python(我的默认是python3)。

于是,我找到了这个网页https://wiki.gnome.org/Projects/Jhbuild/Dependencies/ArchLinux

这表明,以

os.environ['PYTHON'] = '/usr/bin/python2' 

行添加到〜/的.config/jhbuildrc,我做到了。当我再次运行jhbuild时,它会发出同样的回溯。
我试着把文件作为〜/ .jhbuildrc。也不起作用。
所以,我卡在这里。任何帮助,将不胜感激。

我在Arch Linux上,fwiw。

当您为jhbuild本身创建./autogen.sh --simple-install时,您可能需要设置PYTHON=/usr/bin/python2jhbuildrc文件仅用于其构建的内容。

另请参阅:https://wiki.archlinux.org/index.php/JHBuild