The "Classic VPython" import statement: from visual import * is obsolete and no longer works in the latest versions of VPython. The latest versions of Vpython use the import statement from vpython import * and there are also some syntax changes between the new vpython and the older "Classic VPython".
Ask your teacher if you are expected to install an older version of Python for this assignment. In order to not interfere with your existing Python installation you should install the required packages for your homework assignment in a sandboxed virtualenv (python3 -m pip3 install virtualenv) Python virtual environment. It's also easier to install Python packages with pip when you're starting off in a fresh, clean Python virtual environment.
How can I use the Visual module? - Python - Stack Overflow
python - VPython 7 - No module visual is found - Stack Overflow
Visual Module?
python - ImportError: No module named visual - Stack Overflow
Videos
The "Classic VPython" import statement: from visual import * is obsolete and no longer works in the latest versions of VPython. The latest versions of Vpython use the import statement from vpython import * and there are also some syntax changes between the new vpython and the older "Classic VPython".
Ask your teacher if you are expected to install an older version of Python for this assignment. In order to not interfere with your existing Python installation you should install the required packages for your homework assignment in a sandboxed virtualenv (python3 -m pip3 install virtualenv) Python virtual environment. It's also easier to install Python packages with pip when you're starting off in a fresh, clean Python virtual environment.
ยป pip install vpython
I am new to python and I haven't coded in a while, the last time I actually coded simple programs was a couple years ago in Java. I recently bought a Computational Physics book, Computational Physics by Mark Newman. In the text it references a module called visual and when I try for reference it i.e. (from visual import sphere) an error comes up saying such a module doesn't exist. I am running Python 3.8.2. I have researched a little bit and come up with the fact that such a module doesn't exist. How would one go about making visual animations in python?
visual module has been renamed to vpython lately.
So to run this now, you first install vpython like:
sudo pip3 install vpython
then replace the line:
from visual import *
with
from vpython import *
That worked for me.
The script requires Vpython to be installed.
Then, make sure it is actually installed. Alternatively, move the library into your local folder. If it still doesn't work, check for an __init__ file.

