getting started with iPhython and vispy - module unknown

905 views
Skip to first unread message

Christoph Kukulies

unread,
Jan 20, 2015, 5:12:48 AM1/20/15
to vi...@googlegroups.com
The following post in the iPhyon-dev list attracted my attention this morning and I immediately
wanted to try it out in an ipython notebook.

I pulled the zip-File from github https://github.com/vispy/vispy, installed it under Windows 7 in
a subdirectory \vispy of my home dir and ran

 python setup.py install

, which went smoothly.

But firing up ipython notebook, pasting the example code from the above link renders
me with
  ImportError: No module named vispy.

(?)

Can anyone fill me up what I may have forgotten or done wrong?

Probably I will still need some GL backend.

FWIW, I ran "make" in the installarion directory and it ran quite a number of tests successfully
although I also got

 
 File "C:\Users\kuku\Anaconda\lib\site-packages\vispy-0.3.0-py2.7.egg\vispy\gloo\gl\desktop.py", line 77,
 
in _get_gl_funco\gl\desktop.py", line 77, in _get_gl_func
    raise RuntimeError('Function %s not present in context.' % name)
RuntimeError: Function glBindFramebuffer not present in context.



with a couple of the tests and finally the test got hung.

Anyway, very promising package, also to explore 3D and OpenGL (again).

--
Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de

Cyrille Rossant

unread,
Jan 20, 2015, 5:15:28 AM1/20/15
to Vispy list
Hi Christoph

If you open a terminal, type "ipython", and then type "import vispy",
what is the console output?

Cyrille
> --
> You received this message because you are subscribed to the Google Groups
> "vispy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to vispy+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Christoph Kukulies

unread,
Jan 20, 2015, 5:32:00 AM1/20/15
to vi...@googlegroups.com
Am 20.01.2015 um 11:15 schrieb Cyrille Rossant:
> Hi Christoph
>
> If you open a terminal, type "ipython", and then type "import vispy",
> what is the console output?
>
> Cyrille

Hi Cyrille,

it imports without any message silently and comes back with the next In [2], seems ok.
Ah, in your example there seems to be a missing
"import vispy" before "from vispy import app, scene".

When I add that in the ipython notebook, the ImportError is gone.

Now I'm getting

INFO: Could not import backend "PyQt4":
No module named PyQt4
INFO: Could not import backend "PyQt5":
No module named PyQt5
WARNING: Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\kuku\Anaconda\lib\site-packages\IPython\kernel\zmq\kernelapp.py", line 468, in main

But I expected that something like that would come up because I have not yet cared about any GL baxkend.

What do you recommend on a Windows 7 system ?

--
Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de

>>

Cyrille Rossant

unread,
Jan 20, 2015, 5:34:44 AM1/20/15
to Vispy list
You shouldn't need a backend if you use IPython/WebGL. You probably
need to update IPython to IPython master (3.0.dev). The master version
of VisPy now requires IPython master until IPython 3.0 is released
(within the next few weeks hopefully).

Christoph Kukulies

unread,
Jan 20, 2015, 9:04:14 AM1/20/15
to vi...@googlegroups.com
Hi Cyrille,

I pulled ipython 3.0 master from github this morning (--recurse -
important!)
and finally after doing a conda update conda anaconda and upgrading
everything (which thew me back to
ipython 2.2) and reinstalling 3.0 I finally got th "jupiter" logo in my
browser.

Only quirk now is the following:


[E 14:43:12.051 NotebookApp] Notebook JSON is not valid v3: u'*' is not
of type
u'integer', u'null'

Failed validating u'type' in schema[u'properties'][u'prompt_number']:
{u'description': u"The code cell's prompt number. Will be null
if the ce
ll has not been run.",
u'minimum': 0,
u'type': [u'integer', u'null']}

On instance[u'prompt_number']:
u'*'
[E 14:43:12.342 NotebookApp] Notebook JSON is not valid v4: u'*' is not
of type
u'integer', u'null'

Failed validating u'type' in schema[u'properties'][u'execution_count']:
{u'description': u"The code cell's prompt number. Will be null
if the ce
ll has not been run.",
u'minimum': 0,
u'type': [u'integer', u'null']}

On instance[u'execution_count']:
u'*'
[E 14:43:12.362 NotebookApp] Notebook JSON is invalid: u'*' is not of
type u'int
eger', u'null'

Failed validating u'type' in schema[u'properties'][u'execution_count']:
{u'description': u"The code cell's prompt number. Will be null
if the ce
ll has not been run.",
u'minimum': 0,
u'type': [u'integer', u'null']}

On instance[u'execution_count']:
u'*'
[I 14:43:13.529 NotebookApp] Writing notebook-signing key to
C:\Users\kuku\.ipyt
hon\profile_default\security\notebook_secret
Cheers

Cyrille Rossant

unread,
Jan 20, 2015, 9:11:12 AM1/20/15
to Vispy list
I just pushed a PR that should fix the problem:
https://github.com/vispy/vispy/pull/709/files
You can try installing this PR.

Alternatively, it may be that your notebooks are broken somehow.
Delete them and use those from the repo.

Christoph Kukulies

unread,
Jan 20, 2015, 9:48:40 AM1/20/15
to vi...@googlegroups.com
Am 20.01.2015 um 15:11 schrieb Cyrille Rossant:
> I just pushed a PR that should fix the problem:
> https://github.com/vispy/vispy/pull/709/files
> You can try installing this PR.
>
> Alternatively, it may be that your notebooks are broken somehow.
> Delete them and use those from the repo.

Hi,

I pulled vispy master from github and ran the both example noteboox
directly from the
cloned repository.

At start I'm informed that a newer notebook version (4) will be used
instead of 3.

Running the cells after another doesn't produce any error but graphical
output isn't produced either.

When I ran example 2 a second time, I got:

copying C:\Users\kuku\Anaconda\lib\site-packages\vispy-0.3.0-py2.7.egg\vispy\app\backends\../../html/static/js/vispy.min.js -> C:\Users\kuku\.ipython\nbextensions\vispy.min.js

and data was loaded from the git repo (100000 points?).

But no output is being produced.

Cyrille Rossant

unread,
Jan 20, 2015, 9:50:05 AM1/20/15
to Vispy list
Any error message in the browser console (F12 in most browsers)? Which
browser do you use? It's been essentially tested on latest Chrome.

Christoph Kukulies

unread,
Jan 20, 2015, 9:59:06 AM1/20/15
to vi...@googlegroups.com
Am 20.01.2015 um 15:50 schrieb Cyrille Rossant:
> Any error message in the browser console (F12 in most browsers)? Which
> browser do you use? It's been essentially tested on latest Chrome.

I'm using FF. Console output below.
Using //@ to indicate sourceMappingURL pragmas is deprecated. Use //#
instead jquery.min.js:1
"Default extension for cell metadata editing loaded." default.js:48
"Raw Cell Format toolbar preset loaded." rawcell.js:82
"Slideshow extension for metadata editing loaded." slideshow.js:43
Mutations-Ereignisse sollten nicht mehr verwendet werden. Verwenden Sie
MutationObserver stattdessen. jquery.min.js:5
getPreventDefault() sollte nicht mehr verwendet werden. Verwenden Sie
stattdessen defaultPrevented. jquery.min.js:5
"Session: kernel_created (167d5479-7dda-4f57-91c8-62fa2e6a1789)"
session.js:52
"Starting WebSockets:"
"ws://localhost:8888/api/kernels/380b2ea5-deca-4749-b682-0d3dc64b7b8b"
kernel.js:436
"Loaded extension: vispy.min" utils.js:29
"Kernel: kernel_connected (380b2ea5-deca-4749-b682-0d3dc64b7b8b)"
kernel.js:97
"Kernel: kernel_starting (380b2ea5-deca-4749-b682-0d3dc64b7b8b)"
kernel.js:97
"Kernel: kernel_ready (380b2ea5-deca-4749-b682-0d3dc64b7b8b)" kernel.js:97
"Loaded extension: vispy.min" utils.js:29
Error: WebGL: Refused to create ANGLE OpenGL context because of
blacklisting. vispy.min.js:1
Error: WebGL: Refused to create native OpenGL context because of
blacklisting. vispy.min.js:1
Error: WebGL: WebGL creation failed. vispy.min.js:1
Error: WebGL: Refused to create ANGLE OpenGL context because of
blacklisting. vispy.min.js:1
Error: WebGL: Refused to create native OpenGL context because of
blacklisting. vispy.min.js:1
Error: WebGL: WebGL creation failed. vispy.min.js:1
Object { fileName:
"http://localhost:8888/static/base/js/utils.js?v=20150120155108",
lineNumber: 693, columnNumber: 18, stack:
"WrappedError@http://localhost:8888/static/base/js/utils.js?v=20150120155108:693:19
reject/<@http://localhost:8888/static/base/js/utils.js?v=20150120155108:772:33
", message: "Couldn't create a view for model id
'64d41908df1c4f28baa7d9c19cdfae63'", error_stack: Array[5] } utils.js:773

Object { fileName:
"http://localhost:8888/static/base/js/utils.js?v=20150120155108",
lineNumber: 693, columnNumber: 18, stack:
"WrappedError@http://localhost:8888/static/base/js/utils.js?v=20150120155108:693:19
reject/<@http://localhost:8888/static/base/js/utils.js?v=20150120155108:772:33
", message: "Could not create or display view", error_stack: Array[5] }
utils.js:773

Object { fileName:
"http://localhost:8888/static/base/js/utils.js?v=20150120155108",
lineNumber: 693, columnNumber: 18, stack:
"WrappedError@http://localhost:8888/static/base/js/utils.js?v=20150120155108:693:19
reject/<@http://localhost:8888/static/base/js/utils.js?v=20150120155108:772:33
", message: "Could not display view", error_stack: Array[5] } utils.js:773

Object { fileName:
"http://localhost:8888/static/base/js/utils.js?v=20150120155108",
lineNumber: 693, columnNumber: 18, stack:
"WrappedError@http://localhost:8888/static/base/js/utils.js?v=20150120155108:693:19
reject/<@http://localhost:8888/static/base/js/utils.js?v=20150120155108:772:33
", message: "Could not process display view msg", error_stack: Array[5]
} utils.js:773

Cyrille Rossant

unread,
Jan 20, 2015, 10:02:26 AM1/20/15
to Vispy list
Apparently your GPU is blacklisted by Firefox
(http://chat.stackoverflow.com/transcript/message/19399369#19399369).
What is your GPU and what are your drivers?

Can you try with Chrome?

Christoph Kukulies

unread,
Jan 20, 2015, 10:41:09 AM1/20/15
to vi...@googlegroups.com
Am 20.01.2015 um 16:02 schrieb Cyrille Rossant:
> Apparently your GPU is blacklisted by Firefox
> (http://chat.stackoverflow.com/transcript/message/19399369#19399369).
> What is your GPU and what are your drivers?

NVIDIA GeForce Go 7900GS
Various DLL signed by Microsoft, edited by NVIDIA.
Version 7.15.11.7967 mostly.
Latest drivers as of Windows Update.

webgl_example_1.ipynb is running now under Google CHrome (which I
installed right before).

webgl_example_2.ipynb gives an error:
popup, saying:

Notebook Validation failed: u'name' is a required property:
{}



kernel log in the cmd window:

[W 16:34:28.785 NotebookApp] Timeout waiting for kernel_info reply from
06488243
-e9ab-4706-b4d1-9de3c109a3e2
[I 16:34:42.825 NotebookApp] Saving file at /webgl_example_1.ipynb
[I 16:36:16.470 NotebookApp] Saving file at /webgl_example_2.ipynb
[E 16:36:16.552 NotebookApp] Notebook JSON is invalid: u'name' is a
required pro
perty

Failed validating u'required' in
schema[u'properties'][u'metadata'][u'proper
ties'][u'language_info']:
{u'description': u'Kernel information.',
u'properties': {u'codemirror_mode': {u'description': u'The
codemirror m
ode to use for code in this language.',
u'oneOf': [{u'type':
u'string'},
{u'type':
u'object'}]},

u'file_extension': {u'description': u'The file
extensio
n for files in this language.',
u'type': u'string'},
u'mimetype': {u'description': u'The mimetype
correspond
ing to files in this language.',
u'type': u'string'},
u'name': {u'description': u'The programming
language wh
ich this kernel runs.',
u'type': u'string'},
u'pygments_lexer': {u'description': u'The
pygments lexe
r to use for code in this language.',
u'type': u'string'}},
u'required': [u'name'],
u'type': u'object'}

On instance[u'metadata'][u'language_info']:
{}

thanks. interesting experimenting today. Actually I started my day doing
something different :)
But I've learnt quite a lot (bit). :)

Cyrille Rossant

unread,
Jan 20, 2015, 10:42:30 AM1/20/15
to Vispy list
The PR fix has just been merged: you could download the latest package
and example notebooks and try again. That should work now.

You're welcome. :)

Christoph Kukulies

unread,
Jan 20, 2015, 10:50:48 AM1/20/15
to vi...@googlegroups.com

Cyrille Rossant

unread,
Jan 20, 2015, 10:57:49 AM1/20/15
to Vispy list
Thanks! I just pushed another PR fixing the problem. We had renamed 'discrete' to 'zero' in interpolation schemes but the notebook examples hadn't been updated. I've also updated the notebooks to IPython 3.0.

Christoph Kukulies

unread,
Jan 20, 2015, 11:00:36 AM1/20/15
to vi...@googlegroups.com
Am 20.01.2015 um 16:42 schrieb Cyrille Rossant:
> The PR fix has just been merged: you could download the latest package
> and example notebooks and try again. That should work now.
>
> You're welcome. :)
I just tried the update example notebooks (that's what got downloaded
when I git pulled.
(not so familar with git: should I do git pull or git checkout master ?)


example_2 does such heavy things to my graphics card that it causes a
black screen and
graphics card driver restart (from Windows) :)

Cyrille Rossant

unread,
Jan 20, 2015, 11:03:53 AM1/20/15
to Vispy list
git pull should do it

It looks like this is a quite old GPU (and possibly laptop), right?
Example 2 is possibly hardcore on old GPUs, but not so much on
slightly more recent ones (< 3-4 years).

Also: that example might work better on desktop OpenGL (see molecular
example in vispy/examples/demo/gloo), but you'll need a backend (like
PyQt4).

Christoph Kukulies

unread,
Jan 20, 2015, 11:11:15 AM1/20/15
to vi...@googlegroups.com
Am 20.01.2015 um 17:03 schrieb Cyrille Rossant:
> git pull should do it
>
> It looks like this is a quite old GPU (and possibly laptop), right?

Yes,
my laptop, a Dell Inspiron 9400 (build year 2006) with that NVidia
GeForce GS 7900 has come into its age.
Time to buy something new. Any recommendation what OpenGL capable
noteboox is concerned?

> Example 2 is possibly hardcore on old GPUs, but not so much on
> slightly more recent ones (< 3-4 years).
>
> Also: that example might work better on desktop OpenGL (see molecular
> example in vispy/examples/demo/gloo), but you'll need a backend (like
> PyQt4).

I see. Will possible install the same on my desktop machine and install
a better graphics card.

Cyrille Rossant

unread,
Jan 20, 2015, 11:23:49 AM1/20/15
to Vispy list
> Yes,
> my laptop, a Dell Inspiron 9400 (build year 2006) with that NVidia GeForce
> GS 7900 has come into its age.
> Time to buy something new. Any recommendation what OpenGL capable noteboox
> is concerned?

I think any recent laptop with a discrete AMD (Radeon) or NVIDIA
(Geforce) GPU will do it. Gaming laptops often come with good GPUs. I
would advise against integrated and Intel GPUs.

The following pages may be useful if you want a comprehensive list of models:

http://en.wikipedia.org/wiki/List_of_Nvidia_graphics_processing_units#Comparison_table:_Mobile_GPUs
http://en.wikipedia.org/wiki/List_of_AMD_graphics_processing_units#Comparison_table:_Mobile_GPUs

Have a look at the memory (1, 2, 4 GB or even more), number of cores
(>1500 on latest models), OpenGL version (4.5 is the latest). The
GFLOPS value will also give you an idea of raw performance.
Reply all
Reply to author
Forward
0 new messages