Solve the following similar error reports:
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 42, in <module> raise ImportError, str(msg) + ', please install the python-tk package' ImportError: /usr/lib/libtk8.5.so.0: invalid ELF header, please install the python-tk package
terms of settlement:
It appears that the library is corrupted
sudo apt get remove Python TK ,
sudo apt get clean download the package again,
sudo apt get install Python TK and then try importing again
this problem is resolved.
Another possibility is that you somehow messed up your apt/sources. List, and you installed a library for the wrong platform.
- Solution of OpenCV library import error in Python 3
- fatal error: Python.h: No such file or directory
- ImportError: ‘DLL load failed: %1 is not a valid Win32 application.
- Solutions to the failure of importing Python 3.7 SSL module
- Scrapy runs a crawler with an error importerror: cannot import name suppress
- Importerror: the perfect solution of no module named CV2!!! (not too good)
- Python’s importerror: DLL load failed: the specified module was not found and the problem was solved
- EnvironmentError:mysql config not found
- Cannot run program “make” when compiling APM firmware with eclipse under Windows: launching failed problem
- ImportError: No module named indexes.base
- No module named numpy error in Python code
- Importerror: DLL load failed while importing win32gui: 1 is not a valid Win32 Application.
- On the problem of from PIL import image
- Python：ImportError: No module named indexes.base
- AttributeError: ‘_io.TextIOWrapper‘ object has no attribute ‘softspace‘
- tensorflow import error: DLL load failed: The specified module could not be found (DLL load failed: The specified module could not be found)
- matplotlib error – no module named tkinter
- [error reported] [Python] [Matplotlib] importerror: failed to import any QT binding
- Error encountered while executing PIP install: error: complete output from command Python setup.py egg_ info:
- Raspberry pie upgrade to Python 3.7.3