简体   繁体   中英

Vpython localhost opens but keeps forever blank

I have installed vpython from the terminal using pip install vpython , and it installed successfully. I am using python 3.10.2. When I write from vpython import * nothing happened. Then I write vp.box() or vp.sphere() .a Microsoft Edge window opens called localhost:53184 but it keeps blank forever. I tried to reinstall the package but it still not work.

I'm even tried this:

from vpython import *

box()
while True:
  pass

and it still the same

here is the package:

C:\Users\Avi>pip show vpython
Name: vpython
Version: 7.6.3
Summary: VPython for Jupyter Notebook
Home-page: http://pypi.python.org/pypi/vpython/
Author: John Coady / Ruth Chabay / Bruce Sherwood / Steve Spicklemire
Author-email: bruce.sherwood@gmail.com
License: LICENSE.txt
Location: c:\program files\python310\lib\site-packages
Requires: autobahn, ipykernel, jupyter, jupyter-server-proxy, numpy
Required-by:

how can I fix it?

It's possible that the problem is with your infinite loop which, depending on what launcher you use, could completely lock up the browser and prevent any display. Either delete the last two lines, or change "pass" to "rate(100)".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM