简体   繁体   中英

How do I install pygame with cmd?

I have an idea for a game that uses the module pygame . The thing is, I don't know how to install it.

I have tried to open up cmd and type:

pip install pygame

But it came up with an error saying:

pip is not recognized as an internal or external command

Please help me.

To install pygame you need to write the command:

pip install pygame

in your command prompt, if that does not work try:

pip3 install pygame

If that fails, make sure to install python from this link . Make sure to add python and pip to your environment path. Restart your computer and then try again!

If you have already installed python, try running the installer again and this time including pip in the environment path or you can add it manually, this link will help you do this.

You need to add the path of your pip installation to your PATH system variable. After this, use: pip install pygame

Well it looks like you don't have pip installed on your system. You should download it first.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM