【问题标题】:ShimWarning on importing Shell form SimpleCVShimWarning 导入 Shell 表单 SimpleCV
【发布时间】:2015-11-17 02:15:25
【问题描述】:

当我从 SimpleCV 导入 Shell 时

从 SimpleCV 导入外壳

我收到此错误

C:\Python27\lib\site-packages\IPython\config.py:13:ShimWarning:IPython.config 包已被弃用。您应该改为从 traitlets.config 导入。 “你应该从 traitlets.config 导入。”,ShimWarning)

C:\Python27\lib\site-packages\IPython\frontend.py:21: ShimWarning: 顶级frontend 包已被弃用。它的所有子包都已>移至顶部IPython 级别。 "它的所有子包都被移到了IPython 的顶层。", >ShimWarning)

虽然在调用

Shell.main()

SimpleCV 控制台确实启动了,但是当我关闭 img.show() 的窗口时,它只是退出了整个 python 控制台,而不仅仅是 SimpleCV 控制台

不知道发生了什么!

【问题讨论】:

  • 你找到解决方案了吗?

标签: python python-2.7 simplecv


【解决方案1】:

一些 SimpleCV 代码需要更新 - 我相信它是为比安装版本更旧的版本编写的。以下是您需要做的:

找到Shell.py,它可能在C:\Python27\Lib\site-packages\SimpleCV\Shell 之类的地方,然后在编辑器中打开它。然后执行以下操作

在第 50 行左右将 from IPython.config.loader import Config 更改为 from traitlets.config.loader import Config

在第 51 行附近,将 from IPython.frontend.terminal.embed import InteractiveShellEmbed 更改为 from IPython.terminal.embed import InteractiveShellEmbed

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-02-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-04-19
    • 2014-06-09
    相关资源
    最近更新 更多