python-pygame installation tutorial

There are many installation tutorials about python and pygame on the Internet. Most of them are more troublesome. Here is a very simple installation method for you. (Because most of the installations are written in detail in the novice tutorial)

python is 32 bit python is 3.6

1 pip configure

After installing python, configure the environment variables.

To install pygame, you need to configure two environment variables first.

The first is python's. First open the computer, then click 'System Properties' then click 'Advanced System Settings' and then click 'Environment Variables', find the path in the system variables, select and edit and add a ";" sign at the end as the interval with the front. I installed python to the py folder of the c drive so my installation directory is C:\py. (Don't close the interface for editing system variables, let's look for the second environment variable)

The second is pip (we install pygame through pip) pip is in the Scripts file in the installed python, so the added directory is C:\py\Scripts (I installed python in the py file)

Notice:

The two added variables should be separated by ";" Mine is ';C:\py;c\py\Scripts' (without quotes)

 Then press OK, OK, OK, to save. (First step done!)

pip update command: python -m pip install --upgrade pip

2 Install pygame

Click start, enter cmd, open cmd, and enter python

 If it is the same as the picture below (the second picture), python is successfully configured.

Then close cmd, reopen it, enter pip and press Enter to install and wait for a few seconds. If it is the same as the picture below (the fourth picture), the pip installation is successful. (Previously, the pip configuration can only be successfully installed. If an error is reported, the previous steps may be wrong!)

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325206804&siteId=291194637