Unable to import tkinter in notebook

griffinw
New Contributor III

Hello,

I am unable to import tkinter (or Tkinter) into a python notebook.

I also tried %pip install tkinter at the top of the notebook.

Has anyone else been successful at this, or if it's impossible, why? Thank you

Megan05
New Contributor III

Have you tried installing the module through the cluster settings? Navigate to libraries in your cluster's settings and install from there. You should then be able to import into your notebook when attached to that cluster.image.pngNote that the cluster runtime has to be less than 7.0 to install tkinter

View solution in original post

Exactly try also to install python3-tk from PyPl


My blog: https://databrickster.medium.com/

griffinw
New Contributor III

thank you

ahmedE_
New Contributor II

Hi @Will Griffin​ Can you confirm if this worked for you?

I get a message `ERROR: No matching distribution found for python3-tk`.

griffinw
New Contributor III

I was able to PyPI install "tk" and "tk-tools"

fwiw I don't actually use them now as I found databricks widgets that meet my needs for interactive choice inside notebooks