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
try sudo apt get remove Python TK
,
then 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.
Reference link:
https://stackoverflow.com/questions/11043844/python-tk-package-not-recognized-in-python-2-7-3
Read More:
- ImportError: ‘DLL load failed: %1 is not a valid Win32 application.
- raise HTTPError(req.full_url, code, msg, hdrs, fp)urllib.error.HTTPError: HTTP Error 404: Not Found
- Importerror: DLL load failed while importing win32gui: 1 is not a valid Win32 Application.
- Record the python package EXE file running error importerror, but do not prompt specific error solution
- Resolve importerror: cannot import name ‘totensor’ error
- Install Python package under MacOS: “error: Command ‘GCC’ failed with exit status 1”
- Python:ImportError: No module named indexes.base
- Python: Understanding__ str__
- Solve the problem of unable to locate package python3.6 when upgrading from python3.5 to python3.6 in ubantu16.04
- Perfect solution to raise runtimeerror (“distributed package doesn’t have nccl”) in Windows system“
- Python’s importerror: DLL load failed: the specified module was not found and the problem was solved
- Resolve importerror: cannot import name ‘TF_ utils’
- raise RuntimeError(RuntimeError: ‘cryptography‘ package is required for sha256_password or caching
- Python error: importerror: DLL load failed: unable to find the specified module solution
- Typeerror: write() argument must be STR, not bytes and the method of writing binary file in Python 3
- Typeerror: write() argument must be STR, not bytes and the method of writing binary file in Python 3
- [Solved] Please verify that the package.json has a valid “main” entry
- ModuleNotFoundError: No module named ‘numpy.testing.nosetester‘
- Package summary of installing python with CONDA
- About Python setup.py Install error