Hi,
I have recently installed vpython, using pip install vpython for my Python 3.9 on Windows/10 Home.
I tried to run this simple 2 line program:
import vpython
print('done')
When run under Python 3.9 IDLE - it runs as expected.
However, if I try to run it on a CMD prompt window, I get the following error:
C:\Users\Raspberry\AppData\Local\Programs\Python\Python39>python Y:\Source\Python\_Python3\vPython\vPythonintro.py
done
exit
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "C:\Users\Raspberry\AppData\Local\Programs\Python\Python39\lib\site-packages\vpython\vpython.py", line 22, in Exit
a = 1.0/zero
ZeroDivisionError: float division by zero
It seems to run OK, but falls over on the exit process.
If I comment-out the import vpython line - it runs with no error, so I know its related to vpython.
I have thousands of working Python programs and this is the first time I have been stumped for an answer.
Any ideas?
I eventually need to run it from VScode, but I need to resolve this first.