Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 7.6.5 instead.
Reason given by maintainers: Accidental partial upload from CI (pre-release guard missing); incomplete wheel set. Use 7.6.5, or install this exact version only via the GitHub release.

VPython

This package enables one to run VPython in a browser, using the GlowScript VPython API, documented in the Help at https://www.glowscript.org. If the code is in a cell in a Jupyter notebook, the 3D scene appears in the Jupyter notebook. If the code is launched outside a notebook (e.g. from the command line), a browser window will open displaying the scene.

VPython makes it unusually easy to create navigable real-time 3D animations. The one-line program "sphere()" produces a 3D sphere with appropriate lighting and with the camera positioned so that the scene fills the view. It also activates mouse interactions to zoom and rotate the camera view. This implementation of VPython was begun by John Coady in May 2014. Ruth Chabay, Matt Craig, and Bruce Sherwood are assisting in its further development.

Installation

For more detailed instructions on how to install vpython, see https://vpython.org, where you will also find a link to the VPython forum, which is a good place to report issues and to request assistance.

Briefly:

  • If you use the anaconda python distribution, install like this: conda install -c vpython vpython
  • If you use any other python distribution, install this way: pip install vpython

Sample program

Here is a simple example:

from vpython import *
sphere()

This will create a canvas containing a 3D sphere, with mouse and touch controls available to zoom and rotate the camera:

Right button drag or Ctrl-drag to rotate "camera" to view scene.
To zoom, drag with middle button or Alt/Option depressed, or use scroll wheel.
     On a two-button mouse, middle is left + right.
Shift-drag to pan left/right and up/down.
Touch screen: pinch/extend to zoom, swipe or two-finger rotate.

Currently, to re-run a VPython program in a Jupyter notebook you need to click the circular arrow icon to "restart the kernel" and then click the red-highlighted button, then click in the first cell, then click the run icon. Alternatively, if you insert scene = canvas() at the start of your program, you can rerun the program without restarting the kernel.

Run example VPython programs: Binder

Installation for developers from package source

You should install Cython (conda install cython or pip install cython) so that the fast version of the vector class can be generated and compiled. You may also need to install a compiler (command line tools on Mac, community edition on Visual Studio on Windows).

If you don't have a compilier vpython should still work, but code that generates a lot of vectors may run a little slower.

To install vpython from source run this command from the source directory after you have downloaded it:

pip install -e .

The -e option installs the code with symbolic links so that change you make show up without needing to reinstall.

If you also need the JupyterLab extension, please see the instructions in the labextension folder.

vpython build status (for the vpython developers)

Testing workfloww

Working with the source code

Here is an overview of the software architecture:

https://vpython.org/contents/VPythonArchitecture.pdf

The vpython module uses the GlowScript library (vpython/vpython_libraries/glow.min.js). The GlowScript repository is here:

https://github.com/vpython/glowscript

In the GlowScript repository's docs folder, GlowScriptOverview.txt provides more details on the GlowScript architecture.

Here is information on how to run GlowScript VPython locally, which makes possible testing changes to the GlowScript library:

https://www.glowscript.org/docs/GlowScriptDocs/local.html

If you execute build_original_no_overload.py, and change the statement "if True:" to "if False", you will generate into the ForInstalledPython folder an un-minified glow.min.js which can be copied to site-packages/vpython/vpython_libraries and tested by running your test in (say) idle or spyder. (Running in Jupyter notebook or Jupyterlab requires additional fiddling.)

Note that in site-packages/vpython/vpython_libraries it is glowcomm.html that is used by launchers such as idle or spyder; glowcomm.js is used with Jupyter notebook (and a modified version is used in Jupyterlab).

Placing console.log(....) statements in the GlowScript code or in the JavaScript section of glowcomm.html can be useful in debugging. You may also need to put debugging statements into site-packages/vpython/vpython.py.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vpython-7.6.6.dev0.tar.gz (4.6 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

vpython-7.6.6.dev0-cp312-cp312-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.12Windows x86-64

vpython-7.6.6.dev0-cp312-cp312-macosx_10_13_universal2.whl (3.6 MB view details)

Uploaded CPython 3.12macOS 10.13+ universal2 (ARM64, x86-64)

vpython-7.6.6.dev0-cp311-cp311-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.11Windows x86-64

vpython-7.6.6.dev0-cp311-cp311-macosx_10_9_universal2.whl (3.7 MB view details)

Uploaded CPython 3.11macOS 10.9+ universal2 (ARM64, x86-64)

vpython-7.6.6.dev0-cp310-cp310-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.10Windows x86-64

vpython-7.6.6.dev0-cp310-cp310-macosx_10_9_universal2.whl (3.7 MB view details)

Uploaded CPython 3.10macOS 10.9+ universal2 (ARM64, x86-64)

vpython-7.6.6.dev0-cp39-cp39-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.9Windows x86-64

vpython-7.6.6.dev0-cp39-cp39-macosx_10_9_universal2.whl (3.7 MB view details)

Uploaded CPython 3.9macOS 10.9+ universal2 (ARM64, x86-64)

vpython-7.6.6.dev0-cp38-cp38-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.8Windows x86-64

vpython-7.6.6.dev0-cp38-cp38-macosx_11_0_universal2.whl (3.7 MB view details)

Uploaded CPython 3.8macOS 11.0+ universal2 (ARM64, x86-64)

File details

Details for the file vpython-7.6.6.dev0.tar.gz.

File metadata

  • Download URL: vpython-7.6.6.dev0.tar.gz
  • Upload date:
  • Size: 4.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.15

File hashes

Hashes for vpython-7.6.6.dev0.tar.gz
Algorithm Hash digest
SHA256 f8e61192656cb9facdb4ebbad3035c8d23a94f46a4a192c89c0732aa8157a7c6
MD5 08540e44d16f9bc0ebc66745fa170b80
BLAKE2b-256 d894100088e3e0610d93a481cfbeb2be99b417ad1a5120dfc5bb8d9bda060ea6

See more details on using hashes here.

File details

Details for the file vpython-7.6.6.dev0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for vpython-7.6.6.dev0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 206320e123db5aeafcb5bc724e4dfe23cb6e688310f1e699cb7adfac6fae5834
MD5 c2b5d33a7adccfa78a04f6f65507a6b2
BLAKE2b-256 7e1bdfd6db6a5938cb3769bf17b1af063fbb4c5eb9f2abcb090bf6190af20fee

See more details on using hashes here.

File details

Details for the file vpython-7.6.6.dev0-cp312-cp312-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for vpython-7.6.6.dev0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 7e01bc57e5cceea11ec2063f0e0e147e8f350b30b57b7ee2e02a4d3495e7eb94
MD5 f7032f03faa25e0ccfd97743b294d419
BLAKE2b-256 296db952f0a551e849e3cfc47b40bce0050405fe359c7c1bc500c17c7ce2d11f

See more details on using hashes here.

File details

Details for the file vpython-7.6.6.dev0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for vpython-7.6.6.dev0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 7c7e3565ae2ec346806883911220bbdafab7ba11a27b126dc08bc993692df919
MD5 690ac1105ec0502ea2e2ad61cba9f871
BLAKE2b-256 0e8f5d71dfbc53396a8d72800c61bda6d0db15309358460b854eddc08c69cb06

See more details on using hashes here.

File details

Details for the file vpython-7.6.6.dev0-cp311-cp311-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for vpython-7.6.6.dev0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 e2bf18a32213ce390723d3b17c0fc17cc89b11afc3bd8dcf325154327cedc1c2
MD5 26d93ddd5c593b0b766e4f7462147050
BLAKE2b-256 5ad32275bc520787617170bc7aca6a81794c3c579496a08c0699bb9f51300b8a

See more details on using hashes here.

File details

Details for the file vpython-7.6.6.dev0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for vpython-7.6.6.dev0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 27f09195eb41224f7ad8ae7f79500745dc566888e5336f3531cdc05f57a504b8
MD5 20519fc1754963b70b675a21400bbfaf
BLAKE2b-256 1be8e1fe4f92889e80d9f034b1ebfccb24973102b499155ad84da0991196acbd

See more details on using hashes here.

File details

Details for the file vpython-7.6.6.dev0-cp310-cp310-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for vpython-7.6.6.dev0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 f2b567ffc0e1c2bfa8a297fbe587e0e7261e73a8bdeb3a3da09852ce4a4d6067
MD5 35f85283d676d08cae351e375e53fecd
BLAKE2b-256 becd0a4b9739ffbc2c03ac315b30523d47eee8f54c59b90456ffa2db98f536d6

See more details on using hashes here.

File details

Details for the file vpython-7.6.6.dev0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: vpython-7.6.6.dev0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.13

File hashes

Hashes for vpython-7.6.6.dev0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 fd6a1cadab1e03643518ef2e8529339e77cdfb043480cecd7d480463f4a52542
MD5 367b9ee96bd72b36ad23a9a8b2e4397b
BLAKE2b-256 71d7026c9cc9eb35ea76640a63443f1816ad051e28c2b457f4623d668e58d387

See more details on using hashes here.

File details

Details for the file vpython-7.6.6.dev0-cp39-cp39-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for vpython-7.6.6.dev0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 82f4ba731ef2c436d236a47b68026a8f5b7761917fb8b66f60b83f322156b873
MD5 6ba410c12bb7409d30fc8eae96fa81b0
BLAKE2b-256 83d98f00c8a32c6adb6a7552ecaabe358e5e4ca294628f2816df35059bbf64f1

See more details on using hashes here.

File details

Details for the file vpython-7.6.6.dev0-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: vpython-7.6.6.dev0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.10

File hashes

Hashes for vpython-7.6.6.dev0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 327ed4402379671a0887addfb41eec29754bf1f74167340fe0b4384a9de7f982
MD5 ffd2c9ec9faa0076cdd3348831a4b3ca
BLAKE2b-256 ad41bec7a04893e0ab692a4d7165ba7ab0a2f3e4f8def5afa6dd6f664058ad8b

See more details on using hashes here.

File details

Details for the file vpython-7.6.6.dev0-cp38-cp38-macosx_11_0_universal2.whl.

File metadata

File hashes

Hashes for vpython-7.6.6.dev0-cp38-cp38-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 93dcc8521c9a92b7369534dd2fb8158d0c3a51567c0330ed165d3d8bfd21f25f
MD5 988542179fd54f02ab903ed0d6b872fb
BLAKE2b-256 585c08417e663cce85434fe37370f8ef44d6ed34e7ed759a5b020fc0ee19bac2

See more details on using hashes here.

Release history Release notifications | RSS feed

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page