Memorial day is 05/25/2015 – Orders will ship out on May 26th. There will not be any deliveries or shipping on Monday. Any order placed after 11am ET on Friday May 22nd will not start to ship out until Tuesday May 26th.

Occidentalis v0.2, WebIDE, and Tkinter
Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit:

Occidentalis v0.2, WebIDE, and Tkinter

by ptdecker on Sat Jan 26, 2013 7:28 pm


I have installed the WebIDE on Occidentalis v0.2 on my Raspberry Pi. Everything seems to be working fine (nice tutorials!).

However, I'm trying to run the simple program below using the Tkinter GUI libraries:

Code: Select all | TOGGLE FULL SIZE
# File:

from Tkinter import *

# Create root window

root = Tk()
root.title("My First Raspberry Pi GUI")

# Create a frame

app = Frame(root)

# Create a button in the frame

bttn1 = Button(app, text = "Click me!")

# Start main loop


And, I receive the following error when I run it:

Code: Select all | TOGGLE FULL SIZE
webide@raspberrypi /usr/share/adafruit/webide/repositories/my-pi-projects/Hello_World $ sudo python                                                                                                                         
Traceback (most recent call last):                                                                                                                                                                                                     
  File "", line 7, in <module>                                                                                                                                                                                               
    root = Tk()                                                                                                                                                                                                                       
  File "/usr/lib/python2.7/lib-tk/", line 1688, in __init__                                                                                                                                                             = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)                                                                                                                             
_tkinter.TclError: no display name and no $DISPLAY environment variable

I have tried to manually set the $DISPLAY environment variable to the LXDE session running off the HDMI port on the Raspberry PI itself whose $DISPLAY environment variable I confirmed is ':0.0' but had no luck.

Any ideas? Is Occidentalis and the WebIDE incompatible with Tkinter?

P. Todd
Posts: 2
Joined: Fri Dec 17, 2010 2:33 pm

Re: Occidentalis v0.2, WebIDE, and Tkinter

by adafruit on Sun Jan 27, 2013 10:41 pm

the WebIDE is not intended for use with anything except for 'command line' python & our tutorials, so anything else is not supported and should be assumed to not work. we dont have any plans to make tkinter work - our priority is better command-line python support at this time, only

Posts: 11904
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc