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!