Error during running tkinter module


Traceback (most recent call last):
File “.#1 opening”, line 1, in
from tkinter import *
ImportError: No module named tkinter

help plz ??


Does it work outside of Atom?


yes, actually it run in atom’s terminal



This its


Are you sure it’s running the right Python version? I noice you specify 3.6 in the second command, but not in the first. I believe the default will run 2.7 (which has a different list of installed packages).



now i specify the python version ??


First, confirm it fails from your computers command line (you say “atom’s terminal”, so I’m assuming you’re using a package in Atom to run these commands).

If it fails, I don’t know much about Python modules or tkinter. You will probably get better support in a dedicated Python / tkinter forum.

However, if the project works outside of Atom, then it is a problem with an Atom package and we may be able to help investigate further.


yes it work out side atom, and i hope you be able to help




For me it does not work from the normal command line. Only when opening IDLE am I able to do anything. This seems to be a Python type issue, not limited to Atom.

Researching the web came up with:

from tkinter import *
tk = Tk()
btn = Button(tk, text='click me')

Also running with python -i was suggested.

Please go ahead and try the code piece.



yes it is , i run it like this

What is the problem during running code with import tkinter

Please elaborate.



thats what i actually mean