简体   繁体   中英

How do I install Pygame with pip in Python 3.4?

I have tried commands like

pip install pygame

or

pip install 'Pygame == 1.9.1release' --allow-external Pygame --allow-    unverified Pygame

suggested in other threads but and similars but they don't seem to work for me. Help me, please.

I did this in Ubuntu and it worked for me with Python 3.4:

I ran a command which apparently upgraded pip and setuptools to the latest version, according to this guide in the docs , but did it as a superuser. It might end up not being strictly necessary:

sudo pip install -U pip setuptools

Then, I ran the install command for Pygame as a superuser as well:

sudo pip install pygame

In Windows

1.open CMD

2.Path should locate where pip is installed for me it is C:\\Users\\qwrht\\AppData\\Local\\Programs\\Python\\Python36-32\\Scripts>

if python is in other directory follow steps in link CMD command to change directories

3.getting to the right path where pip is installed use command **pip install pygame.**in CMD

4.after Downloading pygame current version, Successfully installed pygame message will be displayed 如图所示

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