cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

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

1 ACCEPTED SOLUTION

Accepted Solutions

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

5 REPLIES 5

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

Hubert-Dudek
Esteemed Contributor III

Exactly try also to install python3-tk from PyPl

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

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!