from __future__ import annotations
SyntaxError: future feature annotations is not defined
I get this error when I try to run my code in the VSCode terminal. I never have this error when I ran my code with PyCharm. I just don't understand what is making it not work in VSCode.
I'm using Python 3.7 as my project interpreter.
Unless you created a virtual environment and selected that as your interpreter, typing something like python3 myfile.py
will not guarantee you are using the Python interpreter you selected in VS Code (that's under the control of your shell, not VS Code). Make sure to use Run Python File in Terminal
as that will make sure your file is run using the selected Python interpreter.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With