偷得浮生半桶水(半日闲), 好记性不如抄下来(烂笔头). 信息爆炸的时代, 学习是一项持续的工作.
全部博文(1748)
分类: Android平台
2017-12-07 19:54:46
sudo apt build-dep pygobject
sudo apt install autoconf-archive
git clone https://git.gnome.org/browse/pygobject
cd pygobject
#./autogen.sh
./autogen.sh --with-python=python3
./configure --with-python=python3
make -j8;
make check
把整个 gi 目录拷贝到 /usr/local/lib/python3.6/dist-packages/
sudo cp gi /usr/local/lib/python3.6/dist-packages/ -fra
验证成功与否
python3
>>> import gi
>>> gi.require_version('Gtk', '3.0')
>>> from gi.repository import Gtk
>>> 成功