Tk-devel also needs to be installed in my caseįor python 3.7 on ubuntu I had to use sudo apt-get install python3. You can use yum to install tkinter module yum install tkinterįor python3 user, install python3-tk package by following command If you're using RHEL, CentOS, Oracle Linux, etc. After reinstalling, all works fine and I can import _tkinter and import Tkinter. A long time ago, I had unchecked the "Tcl/Tk" installation feature. In my case, on Windows, what helped was reinstalling the Python distribution. You don't need to download Tkinter - it's an integral part of all Python distributions (except binary distributions for platforms that don't support Tcl/Tk). one way to get what you need: sudo apt-get install python-tk ![]() Since you mentioned synaptic, you must be using a Debian based system. You will need the package and its dependencies. If you are using Python 3 it might be because you are typing Tkinter not tkinterįor Arch Linux users, it goes a bit like sudo pacman -S tk ![]() An entire afternoon spent on this - hope this note saves others from the pain. It worked for me - and I can now import Tkinter etc to my heart's content - yipidy-yay. Then re-run python setup.py build and python setup.py install in your python installation directory - and it should work. It may seem a pain, but the files are tiny and installation is very fast. configure -prefix=/home/cnel711 -exec-prefix=/home/cnel711 Then open up the readme files inside the. To install locally on Linux (I did it to my home directory), extract the. ![]() I spent ages on Google - but in the end, it's easy.ĭownload the tcl and tk from and install them locally too. On Linux all I needed to do was sudo apt-get install python3-tk. If, like me, 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. After quite a while I finally realized that I needed to install the python-tk package. In addition, for Fedora users, use the following command: sudo dnf install python3-tkinter (Works on Debian-derived distributions like for Ubuntu refer to your package manager and package list on other distributions.)Īctually, you just need to use the following to install the tkinter for python3: sudo apt-get install python3-tk It's safer to apt-get install python-tk on your machine(s). You may build it from sources, but this is usually not the best idea with a binary package-based distro you're apparently running. It is not very easy to install Tkinter locally to use with system-provided Python.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |