Re: [gtk-osx-users] ImportError: No module named gi.

On Mar 31, 2019, at 10:22 AM, John Ralls <jralls ceridwen fremont ca us> wrote:

On Mar 31, 2019, at 7:49 AM, Pascal <p p14 orange fr> wrote:

Le 31 mars 2019 à 16:24, John Ralls <jralls ceridwen fremont ca us> a écrit :

On Mar 31, 2019, at 2:03 AM, Pascal <p p14 orange fr> wrote:

Does "gi" exist for python 2? How to get it?

Build pygobject3 with python2. pygobject is for Gtk2.

Python2 goes out of support at the end of *this year*. It's way past time that you covert your app to 
python3. It's not hard, most apps can be converted in a day or two.

Thanks John for the clarification, I thought pygobject3 was for Python 3 :-(
I made this misunderstanding because I got this error with Python 2:

*** Building pygobject3 *** [4/4]
python build
Traceback (most recent call last):
File "", line 29, in <module>
  import pkg_resources
ImportError: No module named pkg_resources

What is going on?

It's entirely possible that python2 support has been pulled from pygobject3. If that's the case then you'll 
need to roll back to an older version of gtk-osx, modify and use local modulesets with an earlier version 
of pygobject3, or update your application to python3.

README.rst says it supports python2, so I Googled pkg_resources. It's part of python and when I run 
/usr/bin/python and say import pkg_resources it happily does so. Seems that you've broken your python 

John Ralls

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]