I'm going to apply 3D graphic with Python. I used VPython Library and installed It with PIP. My python version is 3.5 and I use the Windows 10 64 bits. I upgraded PIP and also VPython. However, the Python can not realise Visual in this command :from visual import * Please let me know how I can solve this problem.
1 Answer
The latest version of VPython is different from the older "Classic" vpython. Since you installed VPython using pip you have the latest version which requires python version 3.5.3 as a minimum. Try running the following 2 line vpython program.
from vpython import *
sphere()
You should see a 3D window appear in your web browser containing a sphere object.
You tried running a "CLassic VPython" program with the latest version of VPython which won't work. The "Classic VPython" uses the import statement
from visual import *
The new Vpython uses the import statement
from vpython import *
and there are also some syntax changes between the new vpython and the older "Classic VPython"
See the first page of vpython.org for details. Here is the documentation for the new vpython 7 .