white cell output in jupyter??

83 views
Skip to first unread message

Jon Schull

unread,
Jan 24, 2018, 8:52:12 PM1/24/18
to VPython-users
In jupyter, whether I choose python3 or vpython, the standard test... 
import vpython
vpython.box()

...is giving me no response (sometimes) or a white cell (typically on first attempt). (see image)

The same test runs is running under python3 from the terminal (and opens up a browser that renders the box).

which python3

/Users/jonschull-MBPR/anaconda3/bin/python3


I also ran conda -c install vpython vpython
and 
unfortunately in jupyter,  the standard test still hangs. 
conda update -c vpython vpython

In case it's useful...

JonSchull-MBPretina-2:~ jonschull-MBPR$ jupyter --runtime-dir

/Users/jonschull-MBPR/Library/Jupyter/runtime

JonSchull-MBPretina-2:~ jonschull-MBPR$ jupyter --paths

config:

    /Users/jonschull-MBPR/.jupyter

    /Users/jonschull-MBPR/anaconda3/etc/jupyter

    /usr/local/etc/jupyter

    /etc/jupyter

data:

    /Users/jonschull-MBPR/Library/Jupyter

    /Users/jonschull-MBPR/anaconda3/share/jupyter

    /usr/local/share/jupyter

    /usr/share/jupyter

runtime:

    /Users/jonschull-MBPR/Library/Jupyter/runtime

--------

JonSchull-MBPretina-2:~ jonschull-MBPR$ conda install -c vpython vpython

Solving environment: done


# All requested packages already installed.


JonSchull-MBPretina-2:~ jonschull-MBPR$ conda update -c vpython vpython

Solving environment: done


# All requested packages already installed.


jupyter notebook [no joy]





Pasted_Image_1_24_18__8_50_PM.jpg

Aaron Titus

unread,
Jan 25, 2018, 1:21:43 PM1/25/18
to vpytho...@googlegroups.com
Please try the following in a Jupyter notebook:

1. In cell 1:

from vpython import *

2. In cell 2:

scene=canvas()
box()


Please let me know the result.

Thanks,

Aaron

-- 
You received this message because you are subscribed to the Google Groups "VPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vpython-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<Pasted_Image_1_24_18__8_50_PM.jpg>

Jon Schull

unread,
Jan 25, 2018, 6:27:14 PM1/25/18
to VPython-users
No complaint from jupyter, but no  box, either.

Thanks!

Jon Schull

unread,
Jan 27, 2018, 11:24:12 PM1/27/18
to VPython-users
I"ve uninstalled and reinstalled conda as well as jupyter and vpython and still I get no box in jupyter.  (Vpython runs in python3 just fine, opening a browser, and rendering cube.)

Do you know of any online jupyter services that support vpython? 


The one possible clue I see on my computer is that I get nbextension errors  when I create a new file (python3 OR visual file) in jupyter:

     Copy/paste this URL into your browser when you connect for the first time,

    to login with a token:

        http://localhost:8889/?token=3b6a8b5d4bd4920041defa1dd23cbecc266b74b1e8cde5f1

[I 23:09:02.370 NotebookApp] Accepting one-time-token-authenticated connection from ::1

[I 23:09:07.931 NotebookApp] Creating new notebook in 

[I 23:09:09.460 NotebookApp] Kernel started: 56749eed-9e11-43f8-883d-a36b7ab34f35

[W 23:09:09.473 NotebookApp] 404 GET /nbextensions/nb_anacondacloud/main.js?v=20180127230901 (::1) 10.65ms referer=http://localhost:8889/notebooks/Untitled8.ipynb?kernel_name=vpython

[W 23:09:09.481 NotebookApp] 404 GET /nbextensions/nb_conda/main.js?v=20180127230901 (::1) 2.16ms referer=http://localhost:8889/notebooks/Untitled8.ipynb?kernel_name=vpython

[W 23:09:09.491 NotebookApp] 404 GET /nbextensions/jupyter-leaflet/extension.js?v=20180127230901 (::1) 2.81ms referer=http://localhost:8889/notebooks/Untitled8.ipynb?kernel_name=vpython

[W 23:09:09.500 NotebookApp] 404 GET /nbextensions/nbpresent/js/nbpresent.min.js?v=20180127230901 (::1) 3.11ms referer=http://localhost:8889/notebooks/Untitled8.ipynb?kernel_name=vpython

[W 23:09:09.799 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20180127230901 (::1) 2.12ms referer=http://localhost:8889/notebooks/Untitled8.ipynb?kernel_name=vpython

[I 23:09:10.403 NotebookApp] Adapting to protocol v5.1 for kernel 56749eed-9e11-43f8-883d-a36b7ab34f35

^C[I 23:09:45.748 NotebookApp] interrupted

Serving notebooks from local directory: /Users/jonschull-MBPR

1 active kernel

The Jupyter Notebook is running at:

http://localhost:8889/?token=3b6a8b5d4bd4920041defa1dd23cbecc266b74b1e8cde5f1

Shutdown this notebook server (y/[n])? y

[C 23:09:46.890 NotebookApp] Shutdown confirmed

[I 23:09:46.891 NotebookApp] Shutting down 1 kernel

[I 23:09:47.098 NotebookApp] Kernel shutdown: 56749eed-9e11-43f8-883d-a36b7ab34f35

JonSchull-MBPretina-2:~ jonschull-MBPR$ python3

Python 3.6.3 |Anaconda, Inc.| (default, Dec  5 2017, 17:30:25) 

[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin

Type "help", "copyright", "credits" or "license" for more information.

>>> from vpython import *

>>> box()

<vpython.vpython.box object at 0x109b9e3c8>

John

unread,
Jan 28, 2018, 1:00:18 AM1/28/18
to VPython-users
"Do you know of any online jupyter services that support vpython? "

On the vpython.org , if you scroll down you will see a link to "Binder package" . Click on that link and it will run vpython on the Binder service running in google cloud platform. Then click on the "Demos" directory link and you will see a couple of dozen vpython jupyter notebooks that you can run in your browser from the cloud.

John

Jon Schull

unread,
Jan 28, 2018, 8:33:43 AM1/28/18
to vpytho...@googlegroups.com
That's my goal.   But I'd like to develop and test in Jupyter as well.  (Which is why it is so frustrating that It stopped working locally!)

jsc...@e-NABLE.org
cell: 585-738-6696 skype:jonschull
Founder, e-NABLE: volunteers worldwide making free, 3D printed prosthetics
Innovation Fellow, JMK Innovation Fund

From: vpytho...@googlegroups.com <vpytho...@googlegroups.com> on behalf of John <john...@shaw.ca>
Sent: Sunday, January 28, 2018 1:00:18 AM
To: VPython-users
Subject: Re: white cell output in jupyter??
 
You received this message because you are subscribed to a topic in the Google Groups "VPython-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vpython-users/N5LsMplupoA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vpython-user...@googlegroups.com.

Aaron Titus

unread,
Jan 28, 2018, 9:25:07 AM1/28/18
to vpytho...@googlegroups.com
I wish I could help, but I’ve never seen this error. And every time I or my students install anaconda and vpython, it works. It’s been very reliable for us. 

Here are a few questions:

1. When you reinstall Anaconda, do you completely destroy your previous Anaconda folder first?  If I ever install Anaconda over a previous installation, I completely remove the old Anaconda. This means I have to recreate any conda environments and reinstall packages of course.

2. When you install vpython, do you use conda or pip? I’ve settled on using conda; however, pip also worked for me and my students when we used pip.

3. Do you ever use Anaconda environments? This is my favorite way to test things. It’s like having a fresh installation of Anaconda.  In your case, I think you should use vpython in an environment so you can easily delete the environment without having to reinstall other packages you use in other environments. You can try this:

a. conda create -n vpy python=3.6 anaconda

b. source activate vpy

c. conda install -c vpython vpython

Then, open the jupyter notebook. Create a new python3 notebook (not vpython necessarily; you might want to also import the math package if not using a vpython notebook). Then run your test.

My best guess is that it’s a path issue of some kind. Working in an environment might avoid this problem.

Aaron

Jon Schull

unread,
Jan 28, 2018, 2:03:47 PM1/28/18
to vpytho...@googlegroups.com, hpuph...@gmail.com
Thank you Aaron

I did what you suggested, and the puzzle is amazingly robust.  no change.


(vpy) JonSchull-MBPretina-2:anaconda3 jonschull-MBPR$ $PATH

-bash: /Users/jonschull-MBPR/miniconda3/envs/vpy/bin:/Users/jonschull-MBPR/miniconda3/bin:/Users/jonschull-MBPR/Downloads/google-cloud-sdk/bin:/opt/local/bin:/opt/local/sbin:/Users/jonschull-MBPR/anaconda/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/chromedrive:/opt/local/bin/dot:/opt/X11/bin:/usr/local/mongodb/bin:/usr/local/bin: No such file or directory


(vpy) JonSchull-MBPretina-2:anaconda3 jonschull-MBPR$ which python

/Users/jonschull-MBPR/miniconda3/envs/vpy/bin/python


(vpy) JonSchull-MBPretina-2:anaconda3 jonschull-MBPR$ which jupyter

/Users/jonschull-MBPR/miniconda3/envs/vpy/bin/jupyter



A possible clue....?

In the last few days, there seems to be a new message following installation of jupyter notebook: 

    If this is your first install of dbus, automatically load on login with:

        mkdir -p ~/Library/LaunchAgents

        cp /Users/jonschull-MBPR/miniconda3/envs/vpy/org.freedesktop.dbus-session.plist ~/Library/LaunchAgents/

        launchctl load -w ~/Library/LaunchAgents/org.freedesktop.dbus-session.plist


    If this is an upgrade and you already have the org.freedesktop.dbus-session.plist loaded:

        launchctl unload -w ~/Library/LaunchAgents/org.freedesktop.dbus-session.plist

        cp /Users/jonschull-MBPR/miniconda3/envs/vpy/org.freedesktop.dbus-session.plist ~/Library/LaunchAgents/

        launchctl load -w ~/Library/LaunchAgents/org.freedesktop.dbus-session.plist



I've followed those instructions and they don't help, but it does make me wonder about a communication failure between vpython notebook and jupyter...?

I also wonder about these extension failures (which I havent'b been able to fix either)

C 13:51:01.389 NotebookApp] 

    

    Copy/paste this URL into your browser when you connect for the first time,

    to login with a token:

        http://localhost:8888/?token=e82ec7bce576d705d6d1d3fd7798d76c2dc7a00fa7bb8a5d

[I 13:51:01.518 NotebookApp] Accepting one-time-token-authenticated connection from ::1

[I 13:51:08.453 NotebookApp] Creating new notebook in 

[I 13:51:09.764 NotebookApp] Kernel started: da39663c-a6da-43f7-8687-8d6f7858cbfc

[W 13:51:09.780 NotebookApp] 404 GET /nbextensions/jupyter-leaflet/extension.js?v=20180128135100 (::1) 12.61ms referer=http://localhost:8888/notebooks/Untitled2.ipynb?kernel_name=vpython

[W 13:51:09.783 NotebookApp] 404 GET /nbextensions/nb_conda/main.js?v=20180128135100 (::1) 2.48ms referer=http://localhost:8888/notebooks/Untitled2.ipynb?kernel_name=vpython

[W 13:51:09.786 NotebookApp] 404 GET /nbextensions/nb_anacondacloud/main.js?v=20180128135100 (::1) 2.40ms referer=http://localhost:8888/notebooks/Untitled2.ipynb?kernel_name=vpython

[W 13:51:09.792 NotebookApp] 404 GET /nbextensions/scratchpad/main.js?v=20180128135100 (::1) 1.97ms referer=http://localhost:8888/notebooks/Untitled2.ipynb?kernel_name=vpython

[W 13:51:09.796 NotebookApp] 404 GET /nbextensions/nbpresent/js/nbpresent.min.js?v=20180128135100 (::1) 2.58ms referer=http://localhost:8888/notebooks/Untitled2.ipynb?kernel_name=vpython

[W 13:51:09.883 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20180128135100 (::1) 4.83ms referer=http://localhost:8888/notebooks/Untitled2.ipynb?kernel_name=vpython

[I 13:51:11.139 NotebookApp] Adapting to protocol v5.1 for kernel da39663c-a6da-43f7-8687-8d6f7858cbfc

[I 13:51:14.639 NotebookApp] Saving file at /Untitled.ipynb

^C[I 13:53:08.429 NotebookApp] interrupted







Founder,  
e-NABLE: volunteers worldwide making free, 3D printed prosthetics
Innovation Fellow, JMK Innovation Fund

On Sun, Jan 28, 2018 at 9:24 AM, Aaron Titus <hpuph...@gmail.com> wrote:
I wish I could help, but I’ve never seen this error. And every time I or my students install anaconda and vpython, it works. It’s been very reliable for us. 

Here are a few questions:

1. When you reinstall Anaconda, do you completely destroy your previous Anaconda folder first?  If I ever install Anaconda over a previous installation, I completely remove the old Anaconda. This means I have to recreate any conda environments and reinstall packages of course.

2. When you install vpython, do you use conda or pip? I’ve settled on using conda; however, pip also worked for me and my students when we used pip.

3. Do you ever use Anaconda environments? This is my favorite way to test things. It’s like having a fresh installation of Anaconda.  In your case, I think you should use vpython in an environment so you can easily delete the environment without having to reinstall other packages you use in other environments. You can try this:

a. conda create -n vpy python=3.6 anaconda

b. source activate vpy

c. conda install -c vpython vpython

Then, open the jupyter notebook. Create a new python3 notebook (not vpython necessarily; you might want to also import the math package if not using a vpython notebook). Then run your test.

My best guess is that it’s a path issue of some kind. Working in an environment might avoid this problem.

Aaron

On Jan 28, 2018, at 8:33 AM, Jon Schull <jsc...@gmail.com> wrote:

That's my goal.   But I'd like to develop and test in Jupyter as well.  (Which is why it is so frustrating that It stopped working locally!)

Founder, e-NABLE: volunteers worldwide making free, 3D printed prosthetics
Innovation Fellow, JMK Innovation Fund

To unsubscribe from this group and all its topics, send an email to vpython-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "VPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vpython-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "VPython-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vpython-users/N5LsMplupoA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vpython-users+unsubscribe@googlegroups.com.

sebastian gomez

unread,
Jan 29, 2018, 11:54:00 PM1/29/18
to VPython-users
if you want to call vpython module in jupyter you have to write "from ivisual import *"

Jon Schull

unread,
Jan 30, 2018, 12:43:51 AM1/30/18
to vpytho...@googlegroups.com
ivisual ???

I might try that, but it looks like that's vpython from 2 years ago....

"This implementation of VPython was begun by John Coady in May 2014. Ruth Chabay and Bruce Sherwood are assisting in its further development. "

Founder,  
e-NABLE: volunteers worldwide making free, 3D printed prosthetics
Innovation Fellow, JMK Innovation Fund

Bruce Sherwood

unread,
Jan 30, 2018, 6:47:08 AM1/30/18
to VPython-users
Yes. Do not use ivisual, which was the original experiment by John Coady which led to the current vpython.

Bruce

John

unread,
Jan 30, 2018, 1:43:37 PM1/30/18
to VPython-users
What version of notebook are you using. They put out a couple of new versions of notebook in January. In a notebook cell type

notebook.__version__

to get version number. You can also try

conda update notebook to get the latest version.

If you are using Chrome browser then you can try (CTRL SHIFT J) to see the javascript console to see if there are any error messages from the javascript front end. Compare this with a notebook running on the Binder and compare the javascript console there with what you get with a notebook running locally.

John
To unsubscribe from this group and all its topics, send an email to vpython-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

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

--
You received this message because you are subscribed to a topic in the Google Groups "VPython-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vpython-users/N5LsMplupoA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vpython-user...@googlegroups.com.

Jon Schull

unread,
Jan 30, 2018, 4:19:24 PM1/30/18
to vpytho...@googlegroups.com
import notebook
notebook.__version__
'5.0.0' 


The following NEW packages will be INSTALLED:


    send2trash:     1.4.2-py36_0        


The following packages will be UPDATED:


    anaconda:       5.0.1-py36h6e48e2d_1 --> custom-py36ha4fed55_0

    jupyter_client: 5.1.0-py36hf6c435f_0 --> 5.2.2-py36_0         

    jupyter_core:   4.3.0-py36h93810fe_0 --> 4.4.0-py36h79cf704_0 

    notebook:       5.0.0-py36h462289e_2 --> 5.3.1-py36_2         

    terminado:      0.6-py36h656782e_0   --> 0.8.1-py36_0         


Proceed ([y]/n)? y


so now I do have notebook version
'5.3.1'
but alas, no joy.



Founder,  
e-NABLE: volunteers worldwide making free, 3D printed prosthetics
Innovation Fellow, JMK Innovation Fund

To unsubscribe from this group and all its topics, send an email to vpython-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages