ModuleNotFoundError: No module named 'IPython'

Traceback (most recent call last):
  File "demo1.py", line 2, in <module>
    pytreebank.LabeledTree.inject_visualization_javascript()
  File "/home/pikachu/.local/lib/python3.6/site-packages/pytreebank/labeled_trees.py", line 207, in inject_visualization_javascript
    from .javascript import insert_sentiment_markup
  File "/home/pikachu/.local/lib/python3.6/site-packages/pytreebank/javascript/__init__.py", line 2, in <module>
    from IPython.display import HTML, display
ModuleNotFoundError: No module named 'IPython'

pip3 install Ipython

import pytreebank
pytreebank.LabeledTree.inject_visualization_javascript()
line = '(4 (0 你) (3 (2 是) (3 (3 (3 谁) (2 的)) (2 谁))))'
pytreebank.create_tree_from_string(line).display()

你可能感兴趣的:(编程错误,环境搭建)