要下载哪个 "visual" 包?

Which "visual" package to download?

this Github repo 中使用了 visual 包。我做到了

pip search visual

anaconda 提示符中出现了一个长长的列表。我安装哪一个?我正在尝试在 url.

中编写这些程序

我可以选择安装 vpython,但它是这样说的:

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

这些包不好用吗?

看起来导入的 visual 指的是 Visual Python,特别是 Github 的旧 Visual Python based on the fact that that Github repo is already old (last commit 2013). It is indicated in the References 部分回购自述文件:

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

但是 link 会让您进入新的 Visual Python 7。该代码可能只适用于旧版本,因此请尝试查看 Documentation for Class VPython 6。这是文档中使用相同导入的示例代码:

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

查看 Windows, Macintosh, and Linux 的下载部分。对于 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