[英]Unable to use webbrowser.open in python / SimpleCV on Arch
我正在使用Arch Linux上的SimpleCV進行一個簡單的CV項目。 在單個窗口中通過repl顯示圖像和饋送效果很好,但是使用瀏覽器進行顯示不起作用。
img.show()
作品。
img.show(type="browser")
不起作用。 副本顯示以下消息:
/usr/lib/python2.7/site-packages/IPython/html.py:14:ShimWarning:不推薦使用
IPython.html
軟件包。 您應該改為從notebook
導入。IPython.html.widgets
已移至ipywidgets
。 “IPython.html.widgets
已移至ipywidgets
。”,ShimWarning)
奇怪的是,在Debian上同樣可以正常工作,所以我認為可能涉及版本問題。
任何提示將不勝感激。
我認為您擁有的ShimWarning並不是問題(至少現在)。 stacktrace在python映像庫(PIL)中顯示一個異常: Exception: fromstring() has been removed. Please call frombytes() instead.
Exception: fromstring() has been removed. Please call frombytes() instead.
因此,我懷疑您對版本不匹配是正確的。 看起來Arch Linux在python-pil 3.1上,而Debian stable在python-pil 2.6上仍然具有fromstring
方法。
在運行IPython之前,您可以通過從命令行運行pip install pillow==2.6.2
來強制使用PIL版本。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.