[ 06.understand_sentiment ]get import error when running .ipynb as .py in Docker
Created by: livc
➜ 06.understand_sentiment jupyter nbconvert --to python README.ipynb --stdout | python
[NbConvertApp] Converting notebook README.ipynb to python
I0705 07:37:14.153400 475 Util.cpp:166] commandline: --use_gpu=False
load dictionary...
[INFO 2017-07-05 07:37:34,012 networks.py:1482] The input order is [word, label]
[INFO 2017-07-05 07:37:34,014 networks.py:1488] The output order is [__classification_cost_0__]
Traceback (most recent call last):
File "<stdin>", line 353, in <module>
File "/usr/local/lib/python2.7/dist-packages/paddle/v2/plot/plot.py", line 44, in __init__
import matplotlib.pyplot as plt
File "/usr/local/lib/python2.7/dist-packages/matplotlib/pyplot.py", line 115, in <module>
_backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
File "/usr/local/lib/python2.7/dist-packages/matplotlib/backends/__init__.py", line 32, in pylab_setup
globals(),locals(),[backend_name],0)
File "/usr/local/lib/python2.7/dist-packages/matplotlib/backends/backend_tkagg.py", line 6, in <module>
from six.moves import tkinter as Tk
File "/usr/local/lib/python2.7/dist-packages/six.py", line 203, in load_module
mod = mod._resolve()
File "/usr/local/lib/python2.7/dist-packages/six.py", line 115, in _resolve
return _import_module(self.mod)
File "/usr/local/lib/python2.7/dist-packages/six.py", line 82, in _import_module
__import__(name)
File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 42, in <module>
raise ImportError, str(msg) + ', please install the python-tk package'
ImportError: No module named _tkinter, please install the python-tk package