I want to build physics simulations using VPython. Although, VPython works great on websites like trinket.io, I'd like to use a nicer IDE than the web one, and I'd like to use real python modules as well as external libraries like numpy.
I followed the instructions at https://vpython.org/presentation2018/install.html to install VPython locally. I used the command pip install vpython
(not really a fan of conda
) and wrote this simple demo program:
from vpython import sphere
sphere()
When I ran this from the command line, the program indeed worked: a browser window opened displaying the sphere. However, there are several issues with this setup:
RuntimeError: can't register atexit after shutdown
. However, it still seems to run fine.Ctrl+C
also doesn't do anything useful. The only way to stop it is to use Ctrl+Break
, which is a really dirty way, in my opinion. I tried to use stop_server
as documented in that link, but no result.Is there a way to fix these issues or maybe a different environment that will answer my needs? I really want to be able to use built-in python modules and external libraries like numpy but it seems impossible at the moment.
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.