close

how to install tkinter with Pycharm?

Hello Guys, How are you all? Hope You all Are Fine. Today We Are Going To learn about how to install tkinter with Pycharm in Python. So Here I am Explain to you all the possible Methods here.

Without wasting your time, Let’s start This Article.

Table of Contents

how to install tkinter with Pycharm?

  1. how to install tkinter with Pycharm?

    Open your PyCharm project. Go to File->Settings->Project->Project Interpreter. At top, you will see what python interpreter is PyCharm using for a current project. If that's not the system one you have, find path to system interpreter and add it to Python Interpreters in PyCharm.

  2. install tkinter with Pycharm

    Open your PyCharm project. Go to File->Settings->Project->Project Interpreter. At top, you will see what python interpreter is PyCharm using for a current project. If that's not the system one you have, find path to system interpreter and add it to Python Interpreters in PyCharm.

Method 1

For python 2 use:

sudo apt-get install python-tk

For python 3 use:

sudo apt-get install python3-tk

When you display info about packages it states:

Tkinter – Writing Tk applications with Python2 (or Python 3.x)


But my assumption is that PyCharm created it’s own virtualenv for you project, so you are probably using wrong python interpreter in PyCharm.

Open your PyCharm project. Go to File->Settings->Project->Project Interpreter. At top, you will see what python interpreter is PyCharm using for a current project. If that’s not the system one you have, find path to system interpreter and add it to Python Interpreters in PyCharm.

Method 2

Make sure you use the right import statement for your version of Python.

Python 2.7

from Tkinter import *

For Python 3.x

from tkinter import *

Summery

It’s all About this issue. Hope all Methods helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which Method worked for you? Thank You.

Also, Read