简体   繁体   English

在虚拟环境中运行 vpython

[英]running vpython in a virtual environment

I am running python 3.9.9 in vs code and Windows 10. When I run vpython in a standard(global) program my browser opens and the picture appears.我在 vs 代码中运行 python 3.9.9 和 Windows 10。当我在标准(全局)程序中运行 vpython 时,我的浏览器打开并出现图片。 When I run vpython in a virtual environment the browser opens but there is no picture, just a white screen and I do not get error messages.当我在虚拟环境中运行 vpython 时,浏览器打开但没有图片,只有白屏,我没有收到错误消息。 Sample code:示例代码:

from vpython import * myBox = box(length=2,width=1,height=2, color=color.red) while True: pass from vpython import * myBox = box(length=2,width=1,height=2, color=color.red) while True: 通过

You should first try restarting your computer, the same thing happened to me before, if that still doesn't work, maybe try reinstalling Visual Studio Code or VPython你应该先尝试重新启动你的电脑,同样的事情发生在我身上,如果还是不行,也许可以尝试重新安装 Visual Studio Code 或VPython

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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