iPython 导入错误:没有名为显示的模块

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/33589196/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-19 13:36:32  来源:igfitidea点击:

iPython ImportError: No module named display

pythonimport

提问by Shane Denomme

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!

试图运行 python 脚本,但找不到模块 IPython.display .. 看起来很简单,但我在任何地方都找不到答案!

/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

采纳答案by memoselyk

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

根据IPython 的存储库,该IPython.display模块在提交5462c7e中添加,并与 IPython 0.13 一起发布。

I think you have an older version of IPython.

我认为你有一个旧版本的 IPython。

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

您可以使用ipython --version.

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

它可以升级为pip install --upgrade IPython.

回答by Brian

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

在 Pycharm 中导入模块 ipython。在 Pycharm 中转到首选项,然后转到项目解释器。单击“+”号,然后搜索 ipython 并安装包。