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

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group