How to Solve NameError: name 'Vector2' is not defined -- pygame
Solution: Import the 'Vector2' module
To Solve the error, add the following line to the top of your code.
from pygame.math import Vector2
For more information:
Python Vector2 pygame