I have this error when running the script from terminal but works from PyCharm
C:UsersUsernamePycharmProjectsSpace Invaders>python main.py
Traceback (most recent call last):
File “main.py”, line 1, in
ModuleNotFoundError: No module named ‘pygame’
This is how my file directory looks:
I am using python 3.8 and pygame 2.0.1
Should I have to install pygame globally for me to run the script from command line? I have the package installed in a virtual environment.