-2

I'm trying to learn pygame but I'm having trouble installing it because when I go to terminal and type "pip install pygame" but an error pops up and I'm not too sure how to fix it.

This is what happens:

pip : The term 'pip' is not recognized as the name of a
cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that
the path is correct and try again.
At line:1 char:1
+ pip install pygame
+ ~~~
    + CategoryInfo          : ObjectNotFound: (pip:String) [],
    CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

The error

If anyone can help me fix this I would really appreciate it :)

1 Answers1

-1

does pip --version return anything?

I think you just need to add pip to PATH.

In Windows, open cmd.exe and find the location of PYTHON_HOME using where python. Now add this location to your environment variable PATH using:

set PATH=%PATH%;<PYTHON_HOME>\Scripts

Here is a video tutorial to help.

Stephan
  • 345
  • 2
  • 14
  • Just tried that and it output: pip : The term 'pip' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + pip --version + ~~~ + CategoryInfo : ObjectNotFound: (pip:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException Does this mean i dont have it installed? How would I install it? :) – turtlereef Aug 15 '23 at 22:20
  • What operating system are you using? – Stephan Aug 15 '23 at 22:21
  • I'm using Windows 11 – turtlereef Aug 15 '23 at 22:25
  • Follow @mkimball's advice. You probably do not have `pip` yet. That is assuming you have already installed python itself. – Tim Roberts Aug 15 '23 at 22:31