Can't import tkinter

0 votes
I am using Python 2.7 for my project and I am trying to import Tkinter. But I get the following error:

ImportError: No module named tkinter

I have tried both "Tkinter" and "tkinter" but have gotten the exact same message. Can anyone help me fix this issue?
May 21 in Python by ana1504.k
• 6,830 points
19 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
You can Try this code to import Tkinter:

try:
    import Tkinter as tk # this is for python2
except:
    import tkinter as tk # this is for python3
answered May 21 by SDeb
• 11,080 points

Related Questions In Python

0 votes
1 answer

TkInter Grid Overlapping Issue

Tkinter is fairly efficient. And for the ...READ MORE

answered Apr 17, 2018 in Python by anonymous
421 views
0 votes
1 answer

How to import other Python files?

importlib is recent addition in Python to ...READ MORE

answered Jul 27, 2018 in Python by Priyaj
• 56,140 points
33 views
0 votes
1 answer

Need help with Tkinter window formatting using Python

Tkininter comes with the columnspan argument to span the labels ...READ MORE

answered Sep 7, 2018 in Python by ariaholic
• 7,320 points
36 views
0 votes
1 answer

Is there a way of using .lower more effectively in tkinter?

Here is a simple function and some ...READ MORE

answered Sep 25, 2018 in Python by Priyaj
• 56,140 points
97 views
0 votes
1 answer

how can i count the items in a list?

suppose you have a list a = [0,1,2,3,4,5,6,7,8,9,10] now ...READ MORE

answered May 2 in Python by Mohammad
• 1,400 points
69 views
0 votes
2 answers

Removing Title bar in Tkinter program

you can remove the title bar by ...READ MORE

answered Mar 19 in Python by anonymous
762 views
0 votes
1 answer

Can't pickle defaultdict

A module-level function is a function which ...READ MORE

answered Apr 8 in Python by SDeb
• 11,080 points
32 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.