Problem getting Vpython to work with Jupyter Notebook - Help!

18 views
Skip to first unread message

Les Miklos

unread,
Jan 26, 2026, 8:47:07 PM (6 days ago) Jan 26
to VPython-users
I've spent many hours trying to get Vpython to work with Jupyter Notebook. So far no joy.
My environment:
-Jupyter 7.4.5
- Python 3.14.2
-Linux Mint
I installed Vpython using this command line      conda install -c vpython vpython     from a console session and it it appears  to be installed in the correct directory:

These are the files in the 'vpython' directory.

/anaconda3/envs/py314/lib/python3.14/site-packages/vpython

cyvector.cpython-314-x86_64-linux-gnu.so  shapespaths.py
gs_version.py                             _vector_import_helper.py
__init__.py                               vector.py
no_notebook.py                            vpython_data
_notebook_helpers.py                      vpython_libraries
__pycache__                               vpython.py
qtbrowser.py                              with_notebook.py

When I open a notebook and run these command lines :

import vpython as vp
scene = vp.canvas(width=600, height=400,title = 'VPthon Scene')
mySphere = vp.sphere(pos=vp.vector(0,0,0),radius=1,color=vp.color.red)
vp.rate(1)

This is the error message that's generated:

/anaconda3/envs/py314/lib/python3.14/site-packages/vpython/__init__.py:1: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81. from pkg_resources import get_distribution, DistributionNotFound

I'm comfortable poking around in the linux file system, editing files as necessary but I'm a relative noob when it comes to Python. I've looked everywhere online for a solution to the problem but have come up empty.  Any tips on where to look for a solution would be greatly appreciated!




Stephen Spicklemire

unread,
Jan 26, 2026, 8:53:28 PM (6 days ago) Jan 26
to VPython-users, Steve Spicklemire
I’m not sure it will help, but you may find this thread helpful:

https://groups.google.com/g/vpython-users/c/61MjceD4AxA/m/knXxGk98AwAJ
> --
> 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.
> To view this discussion visit https://groups.google.com/d/msgid/vpython-users/ea61098a-90a0-4344-bbb5-7172ebcd0c03n%40googlegroups.com.

John

unread,
Jan 27, 2026, 3:02:03 AM (6 days ago) Jan 27
to VPython-users
Try using python 3.13 or earlier, since vpython has not been updated yet for python 3.14. Since you are using conda you can create a conda environment for python 3.13 with the following command. 

     conda create -n py3.13 python=3.13 pip

where py3.13 is the name of the environment. You can choose to give it any name you want. Then activate the environment and install jupyter and vpython.

     conda activate py3.13

     pip install vpython

Then once everything is installed try running vpython in this environment.

     jupyter lab

 you might also need to install the following packages if you are using the latest jupyterlab or jupyter notebook.

    pip install brotlicffi brotli

You can list all the conda environments on your computer with the command

    conda info -e

Les Miklos

unread,
Jan 28, 2026, 8:01:02 PM (4 days ago) Jan 28
to VPython-users
Thanks guys. Your help is greatly appreciated 

I fixed one set of problems by changing my environment to 3.12 and as suggested by another user, made the warning message go away by inserting these  lines of code  at the head of the file :

import warnings
warnings.filterwarnings("ignore", category=UserWarning, module="vpython")

from vpython import *
Reply all
Reply to author
Forward
0 new messages