简体   繁体   中英

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 . Displaying images and feeds through the repl in individual windows works fine, however using a browser for displaying does not work.

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. You should import from notebook instead. IPython.html.widgets has moved to ipywidgets . " IPython.html.widgets has moved to ipywidgets .", ShimWarning)

Stacktrace on pastebin.

Strangely enough the same works just fine on Debian , so I assume there might be a version issue involved.

Any hint would be highly appreciated.

I think the ShimWarning you have is not the problem (yet, at least). The stacktrace shows an exception in the python imaging library (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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM