Why is there no tkinter distribution found?

前端 未结 8 659
一个人的身影
一个人的身影 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 19:57

    You should install

    apt-get install python-tk
    

    This should solve your issue

    0 讨论(0)
  • 2020-12-30 19:57

    pip shown Could not find a version that satisfies the requirement python--tkinter (from versions: ) No matching distribution found for python--tkinter You are using pip version 10.0.1, however version 19.0.3 is available. You should consider upgrading via the python -m pip install --upgrade pip command.

    0 讨论(0)
  • 2020-12-30 19:59

    to find your package run:

    sudo yum search python|grep tk

    mine was:

    yum install python3-tkinter.x86_64

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

    The Tkinter library comes in default with every Python installation

    Try this:

    import Tkinter as tk
    
    0 讨论(0)
  • 2020-12-30 20:10

    I was able to fix this on Amazon Linux 2 with python2.7 by running this sudo yum install python-tools -y command.

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

    I had to install python3-tk manually before it worked (via apt-get)

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