Page 1 of 1

tkinter did not import successfully

Posted: Fri May 26, 2017 2:40 pm
by dirthurts
Hi,

I'm trying to experiment Guizero in making a simple GUI, and I'm getting this error when I run my program "Tkinter did not import successfully".
I've tried uninstalling and reinstalling guizero, but no luck so far.
I'm following the guide from the latest issue of PiMag. Any thoughts?
my import line is as follows"
from guizero import App, Text, TextBox, PUshButton, Slider

Re: tkinter did not import successfully

Posted: Fri May 26, 2017 3:01 pm
by B.Goode
What computer and Operating System combination are you using?

Re: tkinter did not import successfully

Posted: Fri May 26, 2017 3:31 pm
by scotty101
Which version of python are you using? guizero is designed to work with python 3

Re: tkinter did not import successfully

Posted: Fri May 26, 2017 3:50 pm
by B.Goode
I suggest that where the MagPi article says, at >Step-01: "Now open Python 3 (IDLE)", it should say "Now open Python 3 (IDLE3)"

Re: tkinter did not import successfully

Posted: Fri May 26, 2017 4:37 pm
by dirthurts
I'm using a Raspberry Pi 3 running the latest distribution of Rasbian. It's up to date as of today also.

Re: tkinter did not import successfully

Posted: Fri May 26, 2017 4:38 pm
by dirthurts
That was the problem. The program was simply opening in Python 2 instead of 3.
Opening python 3 then the program fixed it.

Thanks so much. It's always the little things :/