Chapter One Python self-study begins the installation of--python and Pygame

Source: Internet
Author: User

Bought a book, but the book is too pit not the correct method of installation, so I can only my own officer net dead Chew English. The software was downloaded and suddenly realized why I didn't search videos and blogs. Here are some ways to explore yourself.

Official portal

Python official website: https://www.python.org/

Pygame Official website: http://pygame.org/news (I do not know why this website always bring a news, I think this is a sub-page)

Download method

    • If you want to download the latest version of Python for your computer's configuration, simply select downloads directly.
      • Python 3 and Python 2 are not compatible, so there are two options.
      • My Computer chooses Python 3.

    • If you want to download both the historical version and the special version, you can choose all releases (all versions) I chose the 3.6 version of Windows 64bit AMD, so I chose to install the Pygame to find the corresponding only installed.
    • Source Code other platform (additional platform) license (license) alternative implementions (SELECT implementation)

    • If you want to get more versions of Python2 or 3 (such as the old version of the textbook), you need to choose this.
    • Many versions will appear after opening, and the version of my windows64 is found here.
    • In addition, you can choose according to different systems, WINDOWS,LINUX,MAC, etc.
    • You can also choose to develop a test version pre-releases

installation process

Installation of Python

    • There are a number of things to install before installing Pygame.
    • First install the compiler python3.6
    • Do not choose to install now, otherwise it is easy to find the path.
    • Because I searched the Windows AppData seems to be a non-public folder, so now I still do not know how to find out the software folder.
    • To prevent this problem, I chose to customize it.
    • General customization The range of optional installations will be larger, like the idle,pip, file, accelerator, and file associations in auto-install are needed.
    • Note: Be sure to tick add Python 3.6 to the Windows system path (does not seem to be a problem, will be error)
    • I prefer the software to be selected for all users

    • Select the function: (I usually choose to say, should all be necessary?)

    • Select the corresponding advanced options as needed:
  1. Install for all users
  2. Python associated file (need to install the PY emitter (PY update package))
  3. Create shortcut keys during installation
  4. Add python to the environment variable
  5. Pre-compiled standard libraries
  6. Download Debug Run Module
  7. Download Debug Binary (two-yuan) system, This doesn't know what to do with.
    • Change the file installation location, I usually change to their usual soft keyboard D disk .

    • So Python is ready, and the start menu can be searched directly.

Installation of Pygame

    • Pygame must be installed with the same version of Python, or it will be like I installed a 32-bit error has been.
    • The following is the installation package I downloaded directly, want to learn the same as others to install, the result has been wrong.
    • Because I installed 64bit, this version not only need the corresponding version, but also need to use PIP to install the wheel file .
    • Note: The following is a demonstration of my error

    • If it is a 32-bit partner, install it, remember this place must be the fork of the project installed into a local disk .

    • If the installation is wrong, like me, then do not worry, click the installation package again, the following interface appears.
    • Then just point to uninstall it, the other two are modified (add or remove personal features option), repair (ensure that the feature item is still in existence condition)

    • First, on the official website, the latest updated version will appear on the homepage.
    • I ordered it. The first option seemed to be out of order, so I chose the download option, even though I didn't know what the surrogate meant.

    • Version of Pygame 1.9.3 appears download

    • The interface is as follows:
    • There are generally Python wheel files and source files two kinds, look at the official instructions, seemingly direct download wheel file the best.

    • I habitually place the download file on a disk in the software
    • I will create a new download file in the corresponding software folder so that I can always know the files I don't need.

    • Now that the files are in place, I need to unzip the files and install them.
    • Check the Scripts folderbefore installing Pip, if you do not need to go to the Python official website to download.

    • Note: The cmd window is open here
    • First from the C-drive out, just at the beginning I do not know how to input, search -help found the corresponding rules, the following address can be directly copied paste (so it is best not to automatically install the first, otherwise it is difficult to find their own plate)

chdir/d D:\Python36\Scripts Enter pip.exe file corresponding path

Dir Retrieving the contents of a file in a folder

PIP install [wheel file path]

  • Call the Pip.exe in the current folder to execute the installation command, and install the wheel file as the previously downloaded file address (as well as copy and paste it).
  • You can also import pip with a path in any location, and then install wheel

    • Appears as above: processing and successful indicate successful installation.
    • In order to see if the library has been activated, you can enter import pygame (open Pygame port) in the shell file
    • If the success will continue to run, if the failure will be error, need to reinstall Importerror:no module named Pygame.

Chapter One Python self-study begins the installation of--python and Pygame

Related Article

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.