0

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 1

0

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 .

http://www.glowscript.org/docs/VPythonDocs/index.html

Sign up to request clarification or add additional context in comments.

1 Comment

actually, I did your hints but, it doesn't work. I have python 3.5.3. and windows 10 64 bit. Also, I used miniconda to run my code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.