I did pip install pygame
. When I do pip list
, it is installed but when I am trying to import it, it doesn't work.
Try:
python3 -m pip install pygame
If you have multiple instances of python, pip may install them under Python 2. Hence the command to ensure you download for Python 3.
Else refer to here. It may be vs-code throwing a false error.
If you have selected the right python interpreter, you will need not add the site-packages
folder to the Extra Paths
.
Have you tried to switch the python interpreter to the right one which you have installed the packages? You can click the Status Bar on the bottom left of the VSCode to switch it. You can refer to the official docs for more details.
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