Pompitous Uvluv
Pompitous Uvluv

Reputation: 3

Error says Tkinter version 8.6 isn't compatible with IDLE3.6

I have Python 3.6.8 installed on a Jessie Raspberry Pi.

I can't open or access IDLE.

When I enter "idle3.6" into my command line, it throws "**IDLE can't import Tkinter. Your Python may not be configured for Tk. ** That doesn't make sense. After reviewing stackoverflow on the topic, most posts say that I should

 sudo apt install python3-tk

to install Tkinter that would be compatible with IDLE3. I already have Tkinter 8.6. That suggestion doesn't work. Other suggestions I've reviewed instruct to

 sudo apt-get install idle

Again, no dice. Idle.py already appears in my Python-3.6.8 folder (under Lib/Idlelib). Unfortunately I do not know how to access it.

Upvotes: 0

Views: 267

Answers (2)

BoarGules
BoarGules

Reputation: 16941

tkinter is part of the standard library. That means there is always a version available for whatever Python you have. Your assumption about incompatibility is incorrect. So, for example, when I check it in IDLE 3.6.1 I get

Python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 18:41:36) [MSC v.1900 64 bit (AMD64)] on win32
>>> import tkinter
>>> tkinter.TclVersion
8.6

But you can choose to skip the install of tkinter/tcl at Python installation time. If you did that (or suspect that you might have) then you may have to uninstall and reinstall Python to fix the problem.

Tools designed to install 3rd-party libraries may not always be able to repair a core installation problem.

Upvotes: 1

Cam K
Cam K

Reputation: 127

There's two things that might help:

  1. Try Anaconda. It's generally easier to load packages in there.

  2. Try an older version of python (e.g. 2.7.16)

When I pip3 install tkinter, I get told that there is no tkinter version that matches my version of python, so I assume it's because it is not compatible with Python 3.6

Upvotes: 0

Related Questions