Tag Archives: Tkinter

[Solved] Failed to obtain/convert traceback after Python Tkinter packages exe

Exe in Python Tkinter packaging causes failed to obtain/convert traceback!

Problem description

python 3.9
windows 10
Packaged and executed commands
pyinstaller -D -w -i xx.ico main.py

After using pyinstaller to package exe, click the EXE file and an error occurs
failed to obtain/convert traceback
the details are shown in the figure:

Cause of problem

After troubleshooting, it is found that there is no problem with the packaged commands. The problem is that the database does not import data during initialization. The data is null. Just fill in the corresponding database values
summary: the problem is that the code does not handle exceptions properly.

solve the problem

    handle the corresponding code exceptions (including those where exceptions may occur) and populate the database

Linux Ubuntu ImportError: Libtk8.5.so: cannot open shared object file:No such file Install tkinter Library

Ubuntu resolves errors importerror: libtk8.5.so: cannot open shared object file:No such File to install Tkinter Library

 

terms of settlement


terms of settlement


at the beginning, I wanted to install with PIP3, but all of them made mistakes. It seems that PIP does not have this library?Then use </ font> instead

sudo apt-get update
sudo apt-get install python3-tk

   done

note: if there is an error in the installation process, you can refer to my previous article to add image source processing – Linux Ubuntu modify image source

 

matplotlib error – no module named tkinter

The article directories
1 Error report 2 solution

1 error
Try using the Matplotlib package on Linux via Pycharm IDE. When I run this code:

from matplotlib import pyplot

Result error:

ImportError: No module named 'tkinter'

2 Solutions
Ubuntu’s system:

sudo apt-get install python3-tk

Or, if you are a centos server:

sudo yum install python36u-tkinter.x86_64