I have Python 3.10 installed on my Mac, but when I run python --version in the terminal, it says it cannot locate Python. I have also downloaded the developer tools, but it still does not recognize that I have them installed.
The problem is occurring because I am trying to run a Python file with pygame as one of the modules, but it states that I do not have pygame installed, even though I have installed it via pip install pygame and it recognizes that I have done this. I am very confused as to what is going on.
This is happening in the built-in terminal of Code and I am on a Mac.
Steps to reproduce:
Install Python 3.10 on Mac. Install the developer tools. Run python --version in the terminal. Try to run a Python file with pygame as one of the modules. See the error message that says that pygame is not installed. Expected behavior:
I would expect the terminal to be able to locate Python 3.10 and to be able to run a Python file with pygame as one of the modules.
Actual behavior:
The terminal cannot locate Python 3.10 and it gives an error message when I try to run a Python file with pygame as one of the modules.
Possible solutions:
I have tried reinstalling Python 3.10 and the developer tools, but the problem persists. I have tried adding the Pygame directory to my Python path, but the problem persists. Other information:
I am using a MacBook Pro with macOS Monterey 12.3. I am using the built-in terminal of Code. I have tried running the Python file with pygame as a module from the command line, and I get the same error message. Thank you for your help!