iPython ImportError: No module named display

2019-02-27 19:07发布

问题:

Trying to run python script but can't find module IPython.display.. Seems like it would be something simple but I can't find an answer anywhere!

/vagrant/dreamify.py in <module>()
      4 import scipy.ndimage as nd
      5 import PIL.Image
----> 6 from IPython.display import clear_output, Image, display
      7 from google.protobuf import text_format
      8

ImportError: No module named display

回答1:

According to the IPython's repository, the IPython.display module was added in commit 5462c7e, and it was released with IPython 0.13.

I think you have an older version of IPython.

You can check the IPython version with ipython --version.

It can be upgraded with pip install --upgrade IPython.



回答2:

In Pycharm import module ipython. In Pycharm go to preferences and then project interpreter. Click on the "+" sign then search ipython and install package.



标签: python import