Search code examples
pythonpython-3.xanacondavpython

Which "visual" package to download?


A visual package was used in this Github repo. I did

pip search visual

and a long list came up in the anaconda prompt. Which one do I install? I am trying to code those programs in the url.

I have the option of installing vpython but it says this:

anaconda-2019.03-py37_0
jupyterlab_server-0.2.0-py37_0
liblief-0.9.0-ha925a31_2
mkl_fft-1.0.10-py37h14836fe_0
mkl_random-1.0.2-py37h343c172_0
py-lief-0.9.0-py37ha925a31_2
pywavelets-1.0.2-py37h8c2d366_0

Are these packages bad to use?


Solution

  • It looks like the imported visual refers to Visual Python, specifically the old Visual Python based on the fact that that Github repo is already old (last commit 2013). It is indicated in the References section of that Github repo's README:

    VPython: http://www.vpython.org/

    But that link will get you to the new Visual Python 7. That code would only probably work with the old version, so try checking out the Documentation for Class VPython 6. Here's a sample code from the docs which uses the same import:

    from visual import *
    
    floor = box (pos=(0,0,0), length=4, height=0.5, width=4, color=color.blue)
    ball = sphere (pos=(0,4,0), radius=1, color=color.red)
    ball.velocity = vector(0,-1,0)
    dt = 0.01
    

    Check out the Download sections for Windows, Macintosh, and Linux. For Anaconda,

    Installing for Anaconda

    If you are using the Anaconda Python distribution, you can install VPython by typing the following in a Command Prompt (but only for Python 2.7):

    conda install -c mwcraig vpython