Install tkinter for Python

Install tkinter for Python

Asked on November 21, 2018 in tkinter.
Add Comment


  • 3 Answer(s)

    The answer is:

        The Tkimter is  not very easy to install  locally to use with system-provided Python. You may build it from          sources, but this is usually not the best idea with a binary package-based distro you’re apparently running.

    The safer to apt-get install python-tkinter on your machines. Works on Debian-derived distributions like          for Ubuntu; refer to your package manager and package list on other distributions.

    Answered on November 21, 2018.
    Add Comment

    Try this answer:

        The steps to followed are, you just need to use the following to install the              tkinter for python3.

        sudo apt-get install python3-tk
    

        In addition, for Fedora users, use the following command:

        sudo dnf install python3-tkinter
    
    Answered on November 21, 2018.
    Add Comment

    Try this solution:

        If you don’t have root privileges on your network because of your wonderful friends in I.S., and you are                working in a local install you may have some problems with the above approaches

    Download the tcl and tk from http://www.tcl.tk/software/tcltk/download.html and install them locally too.

    To install locally on Linux I did it to my home directory, extract the .tar.gz files for tcl and tk. Then open up          the readme files inside the ./unix directory. I ran

    cd ~/tcl8.5.11/unix
    ./configure --prefix=/home/cnel711 --exec-prefix=/home/cnel711
    make
    make install
     
    cd ~/tk8.5.11/unix
    ./configure --prefix=/home/cnel711 --exec-prefix=/home/cnel711 --with-tcl=/home/cnel711/tcl8.5.11/unix
    make
    make install
    

    The files are tiny and installation is very fast.

    The re-run python setup.py build and python setup.py install in your python installation directory – and it            should work. It worked for me – and I can now import Tkinter etc to my heart’s content – yipidy-yay. An              entire afternoon spent on this – hope this note saves others from the pain.

     

    Answered on November 21, 2018.
    Add Comment


  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.