I'm just trying to make a simple GTK Hello World app run in Pycharm.
- I have installed PyCharm Community Edition 2016.2.
- I have installed any combination of Anaconda (Python 2, Python 3, 32 bit, 64 bit).
- I have downloaded a GTK hello world example
When I try to run this stuff, I first get the error
C:\Users\[...]\Anaconda3\python.exe C:/Users/[...]/PycharmProjects/HelloTk/hellotk.py
Traceback (most recent call last):
File "C:/Users/[...]/PycharmProjects/HelloTk/hellotk.py", line 3, in <module>
import pygtk
ImportError: No module named 'pygtk'
Which I tried to resolve by the instructions on SO: How do I import modules in Pycharm. However, this does not work for the error
Collecting PyGTK
Using cached pygtk-2.24.0.tar.bz2
Complete output from command python setup.py egg_info:
ERROR: Could not import dsextras module: Make sure you have installed pygobject.
Which brought me to the next step, installing pygobject
. At first, this failed because of a missing pkg-config
, which I installed according the instructions on Stack Overflow How to install pkg config in windows?. This seemed to work, but I now get the error
Collecting PyGObject
Using cached pygobject-2.28.3.tar.bz2
Complete output from command python setup.py egg_info:
* glib-2.0.pc could not be found, bindings for glib._glib will not be built.
ERROR: Nothing to do, glib could not be found and is essential.
Googling more, I found Installing PygObject via PIP in virtualenv, but the solution is for Linux only.
Since ~2h since I installed PyCharm and Anaconda I'm trying to compile a stupid simple Hello World program. How do I make it work and what was I doing wrong?