Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Online IDE GUI problems
I am working on a project in python, and I was trying to use cloud9 to run it online. Unfortunately, my project uses tkinter, which doesn't seem to work in c9. Is there any way to get it to run? I've put a lot of work into this- I don't want to have to throw out my code.
download python and make sure tkinter is installed, then run it on your system.
Can you not run it locally on your computer?
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
I'm doing this online, on a VM. It doesn't give me an error if I just write import tkinter. However, if I add root = tkinter.Tk(), I get an error:
Traceback (most recent call last):   File "/home/ubuntu/workspace/", line 18, in <module>     root = tkinter.Tk()   File "/usr/lib/python3.4/tkinter/", line 1854, in __init__ = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use) _tkinter.TclError: no display name and no $DISPLAY environment variable
(And yes, I can run it locally, but I was hoping to get this working so I could share it and stuff)
you need a display to draw GUI programs to. Online interpreters cant send the image back to your monitor to draw.
How would I do that?
you install python onto your computer instead of using an online one.

Forum Jump:

User Panel Messages

Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020