Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 780
KB22 Avatar asked Jan 30 '16 21:01

KB22


1 Answers

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.

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.

like image 121
mjschultz Avatar answered Oct 15 '22 18:10

mjschultz