Python pygame Installation Method,
This article describes how to install pygame in Python. We will share this with you for your reference. The details are as follows:
Here we will mainly describe how to install pygame.
Like me, many people may find that pygame is a good stuff, but they just don't know how to use it or
Pygame is a Python module designed to develop the game, in fact, the same as time, OS, sys are the same stuff. Today began to formally learn pygame, download address: www.pygame.org. After downloading the installation is complete, in pygame learning, I used the SPE editor, feel good.
1.
Pygame is a Python module designed to develop the game, in fact, the white and time, OS, sys are the same stuff. Today began to formally study pygame, download address: www.pygame.org. After downloading the installation is complete, in pygame learning, I used the SPE editor, I feel good.
1.
Python pygame module Installation Process in Linux, pythonpygame
1. Use pip to install the Python package
Most newer Python versions have their own pip, so you can first check whether the system has installed pip. In Python3, pip is sometimes called pip3.
1. Check whether pip is installed in Linux and OS X.
Open a terminal window and run the following command:
In Python2.7:
Zhuzhu @ zhuzhu-K53SJ :~ $ Pip -- versionPip 8.1.1 from/usr/lib/python2.7/dist
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
This example describes the Pygame installation method in Python. Share to everyone for your reference, as follows:
Here is the main description of how we install Pygame
Maybe a lot of people like me, found that pygame is a good thing, but just do not know how to use, or how to install, in the Baidu/google above search, found that there is not an article
A detail
source file. Immediately open the directory/usr/lib/python2.7/This. py. In front of the so-called source code, there is no secret ^_^
7.3 try a script
Next, let's try a classic quick sorting. Even if you don't know what the quick sorting is, it doesn't matter. The point is to see what the Python code will look like and how to run it.
Save the following script as quicksort. py
1: 2: #!/usr/bin/env python 3: 4: import random 5: 6: LENGTH = 10 7: UPPER = 100 8: LOWER = 0 9: 10:
Reprint Please note: @ small Wuyi http://www.cnblogs.com/xiaowuyi
1. Motion RateIn the previous section, a car was driven down the road and the time was delayed using pygame. Time. Delay (200. After reading a lot of reference materials, basically every material will talk about the speed of motion under different configurations of machines. Some are solved by setting the frequency, some are solved by setting the speed, and their own levels are limite
This article mainly introduces Python's function of converting the mouse arrow into a graph by using pygame to replace the mouse movement effect. It involves pygame's graphic operations and has some reference value, for more information, see the example in this article. We will share this with you for your reference. The details are as follows:
Think about the school pygame now has a few minutes, and I wro
button MOUSEBUTTONUP mouse opens the pos, and the button JOYAXISMOTION game handle (Joystick or pad) moves joy, axis, value JOYBALLMOTION Joy ball )? Mobile joy, axis, value JOYHATMOTION game handle (Joystick )? Mobile joy, axis, value JOYBUTTONDOWN game handle press joy, button JOYBUTTONUP game handle open joy, button VIDEORESIZE Pygame window zoom size, w, h VIDEOEXPOSE Pygame window part public (expose)
One, use pip to install Python packageMost newer versions of Python come with a pip, so first check to see if the system already has PIP installed. In Python3, Pip is sometimes referred to as PIP3.1. Check if PIP is installed in Linux and OS X systemsOpen a terminal window and execute the following command:In Python2.7:[Email protected]:~$ pip--versionPip 8.1.1 from/usr/lib/python2.7/dist-packages (Python 2.7)In python3.x:[Email protected]:~$ pip3--versionPip 8.1.1 from/usr/lib/python3/dist-pack
variable (this is the point, otherwise you won't be able to play later)
I was installed by default, and the path is C:\Users\haha\AppData\Local\Programs\Python\Python36 to the environment variable .
Note: If you don't know anything about environment variables, Baidu Search, a lot of
② Mount Pip
1 pip Description: Pip is a Python package management tool that is used to install software packages on PyPI and can replace Easy_install tools.
2 "Installation process
Note: Configuring the PIP's envi
Installation
Start by installing all necessary dependencies, and mercurial and checkinstall for the installation:
1
sudo apt-get install python3-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsdl1.2-dev libsmpeg-dev python-numpy libportmidi-dev ffmpeg libswscale-dev libavformat-dev libavcodec-dev checkinstall mercurial
Then download the latest version ofPygame source code with the following command (this uses mercur
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
This article mainly introduces the font game font implemented by Python Based on pygame. It involves the skills related to Python responding to keyboard buttons and dynamically operating image elements, for more information about font game fonts implemented by Python Based on pygame, see the example below. We will share this with you for your reference. The details are as follows:
In
There is no sound in a user-friendly game. For example, when a role fails, a scream, or a match of weapons during a PK, there is background music when a hero is playing, and there is no sound involved, this section describes how to control sound in pygame. The following is an example, but the blog cannot upload multimedia programs, otherwise, you will be able to hear the most classic music he's a pirate among the Pirates of the Caribbean. The program
After you have identified your Python version, you can proceed to the following steps:
1. Enter the official website http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame Download the corresponding version of the Pygame, pay attention to distinguish between 32 bits and 64 bits.
Here wheel is a compression format that is easy to install in Python.
2. Instal
Yesterday, there is in the Raspberry Pi operation Pygame, but the Raspberry Pi again on the net, very strange, my 306wifi display is the Raspberry Pi connection success, but is unable to use the network, so you can not download pictures, wait for the HDMI line bar.Now, look at the Little turtle's video has been half a year, thanks to his fun and no moral integrity language led me into the vast world of prog
Python font game font Based on pygame (with source code), pythonpygame
This article describes Python font game fonts Based on pygame. We will share this with you for your reference. The details are as follows:
In pygame game development, beautiful fonts are indispensable in a friendly UI.
Today I will give you some introductions on the font of
Reprint Please note: @ small Wuyi http://www.cnblogs.com/xiaowuyi
Pygame. mixer is a module used to process sound and its meaning is "mixer ". In the game, the processing of sound generally includes two parts: making sound and playing sound. Here, only the playing sound is learned.1. Start and initialize pygame. MixerPygame. mixer. INIT (): Initialize mixer.Program, Usually put in the first fewCodeMedium:
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.