NameError: name 'gsprint' is not defined
I repeatedly get this error message when trying to run this:
from vpython import *
box()
I am using Python 3.7.3 and Spyder 3.3.4, and cannot find any help in documentation. Vpython website says I should be able to run it:
I had the same issue: I kept getting these "NameError: name 'gsprint' is not defined" error
messages when running codes with the from vpython import *
line. Strangely, the same codes on Anaconda/Spyder in another computer were working fine.
I ended up in this page while looking for a solution. I tried the simple vpython code above and got the same error message running from spyder while it worked fine running directly in the Anaconda prompt. I checked that the vpython version in the environment is 7.5.0
.
My solution: an overall update on Anaconda
conda update --all
I'm now running with Spyder 3.3.6
and Python 3.7.3
and the code is working fine.
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.