How to install pygtk 3 on Mac OS X?

后端 未结 4 1415
醉梦人生
醉梦人生 2020-12-20 21:13

What I tried:

brew install pygobject3 --with-python@2 gtk+3
brew install pygtk3
brew install pygobject3
pip install pygobject

python -c \'import gi; gi.requ         


        
4条回答
  •  猫巷女王i
    2020-12-20 21:38

    I had the same problem. I followed the instructions on pygobject web.

    • install homebrew
    • Execute brew install pygobject3 --with-python@2 gtk+3
    • Run python3 hello.py

    Everything is fine now (note I use python3 not python for the test) :

    $ python3 -c 'import gi; gi.require_version("Gtk", "3.0"); print("ok")'
    ok
    

提交回复
热议问题