Setting up developement environment: PyCharm, python-gtk, windows

前端 未结 5 2019
再見小時候
再見小時候 2021-01-18 04:06

I want to develop with these tools:

  • MS-Windows 10
  • Python3
  • gtk
  • PyCharm

I installed PyCharm, but up to now Python and g

5条回答
  •  借酒劲吻你
    2021-01-18 04:39

    There two ways of doing what you want.

    But first, lets set something straight, when you say gtk, you don't specify GTK-2 or GTK-3. GTK-2 python bindings aka PyGTK is quite an old package (but still possible to use). GTK-3 python bindings, included in PyGobject are, I imagine, what you want.

    First option

    So, I'll start with the more restrictive one.
    You can install PyGObject through the PyGI AllInOne installer. This is a .exe installer that comes with a lot of stuff, from gtk3 and gstreamer, to gnome applications like Glade and Gedit, to non gnome applications. Why do I say it's restrictive? It only works with Python from version 2.7+ to 3.4+ (32 or 64 bits). So if you want to use Python 3.6, you can't use this. And it seems that it will never be updated.

    Second option

    The other way is using MSYS2, like someone advised before. This option lets you use the current versions of Python supported by mingw-64 repository. Which I believe right now is Python 3.7.
    You can install following the steps as described in the PyGObject site. Or the way explained below (CLion).

    I don't know how to use PyCharm with a MSYS2 python installation, but a bit of googling led me to this tutorial for CLion. Maybe there's an analog for PyCharm.

提交回复
热议问题