dirthurts
Posts: 32
Joined: Fri Dec 23, 2016 4:04 am

tkinter did not import successfully

Fri May 26, 2017 2:40 pm

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

User avatar
B.Goode
Posts: 8987
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: tkinter did not import successfully

Fri May 26, 2017 3:01 pm

What computer and Operating System combination are you using?

scotty101
Posts: 3750
Joined: Fri Jun 08, 2012 6:03 pm

Re: tkinter did not import successfully

Fri May 26, 2017 3:31 pm

Which version of python are you using? guizero is designed to work with python 3
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

User avatar
B.Goode
Posts: 8987
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: tkinter did not import successfully

Fri May 26, 2017 3:50 pm

I suggest that where the MagPi article says, at >Step-01: "Now open Python 3 (IDLE)", it should say "Now open Python 3 (IDLE3)"

dirthurts
Posts: 32
Joined: Fri Dec 23, 2016 4:04 am

Re: tkinter did not import successfully

Fri May 26, 2017 4:37 pm

I'm using a Raspberry Pi 3 running the latest distribution of Rasbian. It's up to date as of today also.

dirthurts
Posts: 32
Joined: Fri Dec 23, 2016 4:04 am

Re: tkinter did not import successfully

Fri May 26, 2017 4:38 pm

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 :/

Return to “Python”