Why is there no tkinter distribution found?

前端 未结 8 660
一个人的身影
一个人的身影 2020-12-30 19:17

I am having a problem during the installation of tkinter. I have version 2.7.11. I entered the pip install tkinter on dos but it shows the following message:

相关标签:
8条回答
  • 2020-12-30 20:14

    Follow this guide to install "tkinter". However now with Python version 3.1 onwards, it is part of the standard python distribution.

    You can also install it using sudo apt-get install python3-tk-dbg, if you are in virtualenv. (Same can be done for normal installation, not just virtualenv)

    0 讨论(0)
  • 2020-12-30 20:17

    the below answer in for Windows:

    after installing Tk in your windows machine by following the instructions mentioned in the following link (https://tkdocs.com/tutorial/install.html#installwin), import tkinter as tk (for python3) or import Tkinter as tk (for python2). FYI - 'Tkinter' has been renamed as 'tkinter' in python3. It worked well for me.

    0 讨论(0)
提交回复
热议问题