Vpython working from terminal but not from Jupyter Notebook

133 views
Skip to first unread message

Nejc Kosanič

unread,
Apr 2, 2021, 7:22:19 AM4/2/21
to VPython-users

Hi there!

As I have scanned many similar questions regarding the problem I have, I am writing to you with a bit of a tricky one:

Vpython is succsefully installed on a (WSL) Ubuntu. I can run it from terminal (the command:
   from vpython import*
   box()
opens a browser window with a box), but when doing the same thing in Jupyter Notebook/Lab returns nothing, it just keeps working. When interrupting kernel, I get
this error every now and then:

Exception ignored in: <function standardAttributes.__del__ at 0x7f7eb0644f70>
Traceback (most recent call last):
  File "/home/nejc/miniconda3/lib/python3.8/site-packages/vpython/vpython.py", line 1092, in __del__
    super(standardAttributes, self).__del__()
  File "/home/nejc/miniconda3/lib/python3.8/site-packages/vpython/vpython.py", line 317, in __del__
    cmd = {"cmd": "delete", "idx": self.idx}
AttributeError: 'box' object has no attribute 'idx'

and "404 GET /proxy/54471/ws" warning in terminal.

I have already reainstalled vypthon several times, tried downgrading it, downgraded jupyter lab, reinstalled jupyter lab but nothing seems to work.

If anyone has a solution for this problem I would greatly appreciate it!

Best regards,
Nejc

John

unread,
Apr 2, 2021, 10:43:25 AM4/2/21
to VPython-users
VPython version 7.6.1 works with JupyterLab version 1.x , so if you want to use VPython in a Jupyter Notebook in JupyterLab then you will need to install JupyterLab 1.x.  VPython should work fine in the classic Jupyter Notebook. are you having problems with running VPython in a classic Jupyter Notebook as well.
Reply all
Reply to author
Forward
0 new messages