[英]Unable to use webbrowser.open in python / SimpleCV on Arch
I'm working on a simple CV project making use of SimpleCV on Arch Linux . 我正在使用Arch Linux上的SimpleCV进行一个简单的CV项目。 Displaying images and feeds through the repl in individual windows works fine, however using a browser for displaying does not work. 在单个窗口中通过repl显示图像和馈送效果很好,但是使用浏览器进行显示不起作用。
img.show()
Works. 作品。
img.show(type="browser")
Does not work. 不起作用。 The repl shows the following message: 副本显示以下消息:
/usr/lib/python2.7/site-packages/IPython/html.py:14: ShimWarning: The
IPython.html
package has been deprecated. /usr/lib/python2.7/site-packages/IPython/html.py:14:ShimWarning:不推荐使用IPython.html
软件包。 You should import fromnotebook
instead. 您应该改为从notebook
导入。IPython.html.widgets
has moved toipywidgets
.IPython.html.widgets
已移至ipywidgets
。 "IPython.html.widgets
has moved toipywidgets
.", ShimWarning) “IPython.html.widgets
已移至ipywidgets
。”,ShimWarning)
Stacktrace on pastebin. pastebin上的Stacktrace 。
Strangely enough the same works just fine on Debian , so I assume there might be a version issue involved. 奇怪的是,在Debian上同样可以正常工作,所以我认为可能涉及版本问题。
Any hint would be highly appreciated. 任何提示将不胜感激。
I think the ShimWarning you have is not the problem (yet, at least). 我认为您拥有的ShimWarning并不是问题(至少现在)。 The stacktrace shows an exception in the python imaging library (PIL): Exception: fromstring() has been removed. Please call frombytes() instead.
stacktrace在python映像库(PIL)中显示一个异常: Exception: fromstring() has been removed. Please call frombytes() instead.
Exception: fromstring() has been removed. Please call frombytes() instead.
So I suspect you are right about a version mismatch. 因此,我怀疑您对版本不匹配是正确的。 It looks like Arch Linux is on python-pil 3.1 while Debian stable is still on python-pil 2.6 which still has the fromstring
method. 看起来Arch Linux在python-pil 3.1上,而Debian stable在python-pil 2.6上仍然具有fromstring
方法。
You might be able to force the PIL version by running pip install pillow==2.6.2
from the command line before you run IPython. 在运行IPython之前,您可以通过从命令行运行pip install pillow==2.6.2
来强制使用PIL版本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.