Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PyGObject on Windows

Over the last few days of headaches, I've found 3 possible methods to do this, all of which have issues.

  • PyGObject's pip install fails due to a lack of Cairo and probably other dependencies. While this would be my preferred method, it would probably be the hardest to fulfill.

  • Using MSYS2 allows me to use GObject through the mingw64 python, but using pip to get my other modulues such as pylint fails. I'd like to have an MSYS2 or similar install on my system anyways to make some windows binaries, so I'm very open to this as well.

    • EDIT: Got pip to work in MSYS2. Make sure to sync toolchain with pacman.
  • PyGObject for Windows seems messy at best and isn't up-to-date. Would require having a second python installation anyways, giving no benefit over MSYS2.

Note I'm a complete newbie to Unix and have little experience with CLI's in general, so any help regarding MSYS2 will need to be explained as if to a child. My only other experience with this stuff involved an endless cycle of hell that was installing Arch to a separate partition, breaking said install, then reinstalling again.

I also tried Cygwin, but I couldn't get that to run Python with GObject at all with my "install all the needed packages then pray" method. Creating a Gtk.Window() caused the terminal to use none of the memory it had and explode.

like image 967
FierySwordswoman Avatar asked Jan 12 '18 01:01

FierySwordswoman


1 Answers

MSYS2 is currently the only "officially" supported way: https://pygobject.readthedocs.io/en/latest/getting_started.html#windows

pip in MSYS2 should work in general, if something doesn't please file a bug at https://github.com/Alexpux/MINGW-packages/issues .

like image 105
lazka Avatar answered Oct 20 '22 18:10

lazka