Installing Pygame Zero - Read The Docs
Có thể bạn quan tâm
On desktop systems¶
pip install pgzeroThis will also install Pygame. Pre-compiled Pygame packages are available to pip for Windows & Linux (32-bit and 64-bit), and for Mac OS (64-bit only). If you have a different system, you’ll need to find a way to install pygame first. Make sure you are using Python 3 not Python 2.
Mac¶
In a Terminal window, type
pip install pgzeroNote that there are currently no Wheels for Pygame that support python 3.4 for Mac, so you will need to upgrade Python to >=3.6 (or use python 2.7) in order to be able to install pygame. For a list of available Wheels, please visit pyPI_
Linux¶
In a terminal window, type
sudo pip install pgzeroSome Linux systems call it pip3; if the above command printed something like sudo: pip: command not found then try:
sudo pip3 install pgzeroSometimes pip is not installed and needs to be installed. If so try this before running the above commands again:
sudo python3 -m ensurepipOn Raspberry Pi¶
pgzero has been installed by default since the release of Raspbian Jessie in September 2015!
For flake8/pyflakes¶
Checkers like Pyflakes are unaware of Pygame Zero’s extra builtins.
If you use flake8, you can add Pygame Zero’s list of builtins to your flake8 configuration file:
[flake8] builtins=Actor,Rect,ZRect,animate,clock,exit,images,keyboard,keymods,keys,mouse,music,screen,sounds,storage,toneIf you use pyflakes directly then this is configured using the environment variable $PYFLAKES_BUILTINS. On Linux and Mac you could write this in your terminal or put it in your shell configuration file (like ~/.bashrc)
PYFLAKES_BUILTINS=Actor,Rect,ZRect,animate,clock,exit,images,keyboard,keymods,keys,mouse,music,screen,sounds,storage,tone exportPYFLAKES_BUILTINSOn Windows:
set PYFLAKES_BUILTINS=Actor,Rect,ZRect,animate,clock,exit,images,keyboard,keymods,keys,mouse,music,screen,sounds,storage,tone
Navigation
- Introduction to Pygame Zero
- Migrating from Scratch
- Event Hooks
- Built-in Objects
- Installing Pygame Zero
- On desktop systems
- On Raspberry Pi
- For flake8/pyflakes
- Running Pygame Zero in IDLE and other IDEs
- Examples
- Tutorials and Resources
- Other libraries like Pygame Zero
- Changelog
- Laptop Stickers
- Roadmap
- Principles of Pygame Zero
- Contributing to Pygame Zero
Related Topics
- Documentation overview
- Previous: Text Formatting
- Next: Running Pygame Zero in IDLE and other IDEs
Từ khóa » Cài đặt Pygame
-
Cách Cài đặt Pygame Và Tạo Mẫu để Phát Triển Trò Chơi Bằng Python 3
-
How To Install PyGame On Windows 10 - YouTube
-
Các Yếu Tố Lập Trình Game Cơ Bản Với Pygame - CodeLearn
-
#1 How To Install PyGame On Windows 10 Mới Nhất
-
Làm Cách Nào để Tải Xuống Pygame Cho Python 3.5.1? - HelpEx
-
Python 3: Làm Thế Nào để Cài đặt Pygame? - HelpEx
-
Top 3 Cách Cài đặt Pygame Mới Nhất Năm 2022 - EZCach
-
Top 15 Cách Tải Pygame Mới Nhất Năm 2022 - EZCach
-
GettingStarted — Wiki - Pygame
-
Không Thể Cài đặt Pygame 1.9.6 Trên Python 3.9 - Dạy Nhau Học
-
Cách Cài Thư Viện Thường Dùng Trong Python Trên Windows
-
How To Install PyGame On Windows 10 Mới Nhất
-
Thuyetnguyen95/pygame - GitHub
-
Cài đặt Pygame Và Python để Lập Trình Game Trên Ubuntu - Demo