简体   繁体   中英

Python version conflict. Jhbuild not reading Jhbuildrc?

I was about to set up pygobject for gtk+3. This http://python-gtk-3-tutorial.readthedocs.org/en/latest/install.html#id2 page says I need Jhbuild. I went ahead and installed that. But, it gives me traceback

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

Which obviously is due to wrong version of python(my default is python3).

So, I found this page https://wiki.gnome.org/Projects/Jhbuild/Dependencies/ArchLinux

Which suggests to add

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

line to ~/.config/jhbuildrc which I did. When I run jhbuild again it spews the same traceback.
I tried putting the file as ~/.jhbuildrc. Doesn't work either.
So, I'm stuck here. Any help would be appreciated.

I'm on Arch Linux, fwiw.

You probably want to set PYTHON=/usr/bin/python2 when you ./autogen.sh --simple-install for jhbuild itself. The jhbuildrc file is only used for things it builds.

See also: https://wiki.archlinux.org/index.php/JHBuild

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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