Evo_installErr
引言
一个一个尝试终于找到错误所在,微笑脸!python导入包seaborn出错:ImportError: No module named '_tkinter', please install the python3-tk package
.
1.依赖项
依赖项中seaborn需要单独安装,自动解析解析不了:pip3 install seaborn
.安装后也无法成功导入。
2.解决
reference:
报错:
Traceback (most recent call last):
File "/usr/lib/python3.5/tkinter/__init__.py", line 36, in <module>
import _tkinter
ImportError: No module named '_tkinter'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.5/runpy.py", line 174, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.5/runpy.py", line 133, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/lib/python3.5/runpy.py", line 109, in _get_module_details
__import__(pkg_name)
File "/usr/lib/python3.5/tkinter/__init__.py", line 38, in <module>
raise ImportError(str(msg) + ', please install the python3-tk package')
ImportError: No module named '_tkinter', please install the python3-tk package
其实报错中已经提示了。
sudo apt-get install tcl-dev tk-dev python3-tk #python3
sudo apt-get install python3 #重新覆盖python3
最后终于能画图了: