Description of the installation of Python and pygame and corresponding environment variable configuration

Source: Internet
Author: User
Here is a small series to bring you a installation of Python and Pygame and the corresponding environment variable configuration (graphics tutorial). Small series feel very good, now share to everyone, also for everyone to make a reference. Let's take a look at it with a little knitting.

hello,everyone!

Python is a good thing! Well, to Li someone this shabby praise, really can't on the table, hope forgive me. Then let's go straight to the dry.

First step: Download the python installation package https://www.python.org/

1. Go to the Python website and click Download

2. After the entry there are two installation packages to choose from (Python will be based on the number of bits of your system smart choice, so there is no need to tangle your computer is 32-bit or 64-bit)

My suggestion is to download the version behind Python3.0 because Python3 has improved some code formats based on Python2. Click Download.

3. Start the installation.

System default your Python is installed in the C drive, you can also change. It is recommended that you choose the default installation.

All the way to the idiot installation: Next press the end.

4. Configure the environment variables.

In the advanced system settings of the Control Panel, click Environment variables, locate the path variable, and at the end of it, enter the paths to install Python: C:\Users\Administrator\AppData\Local\Programs\Python\ Python36-32\scripts

Note: The path goes into the script folder because the Script folder has a PIP application, which is handy for later Python's various libraries.

5. Check.

Open cmd, enter python-v

Indicates that the installation was successful.

Step two: Install Pygame. Download Pygame.

1.pygame

Here we need to select the number of computers corresponding to the. whl file, just now we downloaded the 3.6.1 version of Python, here the corresponding pygame should be

CP36 represents version 3.6.

2. Start the installation.

Open cmd input pip install E:\PYGAME\PYGAME-1.9.3-CP36-CP36M-WIN32.WHL behind the installation address of your PyGame package

Finally, he will prompt Pygame install Success for installation success.

Then we enter python into the Python shell interface, enter import pygame (import Pygame package)

If there is no error, the installation is successful.

This is the installation process for Python and pygame. I'm going to press Pygame with Python because I'm going to use Pygame to do a little game later.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.