importError: No module named tkinter

hello python.org, I have a problem import tkinter module which is summarized as a result.
indeed I follow beginner in python, and I use the system linux mint and IDE atom for my project.
in the terminal the import of python works marvel well the tcl and others. but the problem is that when I import the module tkinter into atom, it shows me this error importError: No module named tkinter.
however I would like to be able to use it. I have searched everywhere but no satisfactory result.
thank you for helping me.

Since Mint is Ubuntu-based you probably need to install tkinter separately (Debian and Ubuntu break out several things from the stdlib that you then must install manually). I think if you do sudo apt-get install python-tk it will get you tkinter.

1 Like

yes certainly I installed all this sudo apt-get install python3.6-tk. the problem is in the terminal we can import the module tkinter but with the IDE atom it shows me the error message which is ImportError: No module named tkinter. I do not touch the problem

Questions like this should go on the Users category, not Ideas.
Otherwise you are making extra work for somebody to move the discussion
(which has been done). If the descriptions on the categories aren’t
clear enough, please suggest how they can be improved.

If you are having trouble with the Atom IDE, the first thing to do is to
confirm that you can import tkinter in the regular Python interpreter,
which I think you have done.

If you can import tkinter in the regular interpreter, then the problem
lies with your Atom setup. You could check to see if Atom is looking at
the same version of Python as your regular interpreter, and that it has
the same Python path.

Also, make sure you have restarted Atom since the tkinter package was
installed, in case Atom is caching the import failure.

1 Like

ok thank you.

thank you for your satisfactory answer. thanks again.

thank you your explanation is exceptional and allowed me to solve my problem.

Don’t be shy, tell us what the problem was so that anyone else who has
the same problem can find the solution.

Thank you.

the problem is that in my terminal when I import tkinter on python3, it works perfectly. but with my editor atom and pycharm when I write this little piece of code import tkinter
top = tkinter.Tk ()
top.mainloop ()
he tells me he can not find the tkinter module. so with your advice I decided to change text editor who is Eric and it works wonders. thank