Search code examples
pythoninitramfslinux-mint-21

Unable to install tkinter on Linux Mint 21.3 Cinnamon. initrafms-tools package issue


I thought tkinter was an inbuilt module in Python, but I could not import it in both VSCode and Pycharm. I check the software Manager program on Linux mint and see that 'Python3-tk' is already installed. I tried uninstalling and re-installing. Same error pertaining to 'initrafms-tools' Unable to move any further.

Installation error on Software Manager

I also tried to install tkinter using a command I found from a previous answer to a similar question. But that didn't work either. Command1: sudo apt-get install python3-tk

Output: Error for command1

I have no idea what this error message means. I have also tried installing 'python-tk' instead of 'python3-tk' in the command above, but to no avail.

I have tried the following too as mentioned in some answers. No luck. sudo apt-get update sudo apt-get install python3-tk I guess the issue is 'initrafms-tools' (on Linux Mint 21.3 Cinnamon) specific per the output and not just to tkinter. Can anyone help resolve this?


Solution

  • Unable to install tkinter on Linux Mint 21.3 Cinnamon ( assuming an issue with initramfs-tools package as the reason ).

    You were fooled by the error message about initramfs-tools package initialization into believing that the installation of tkinter failed, but the experienced error message resulted from with the installation of python3-tk package non-related issue apt-get raised to inform you about overall package installation problems known to apt-get ( as already mentioned in the comment to your question by Friedrich ).

    In other words the statement that tkinter installation failed was the result of wrong assumptions resulting from wrong interpretation of apt-get output.