How to download pygame

How to download pygame

GettingStarted — wiki

Pygame Installation¶

Pygame requires Python; if you don’t already have it, you can download it from python.org. It’s recommended to run the latest python version, because it’s usually faster and has better features than the older ones. Bear in mind that pygame has dropped support for python 2.

To see if it works, run one of the included examples:

Next steps. ¶

Further info on installation¶

Hopefully the installation instructions above worked for you. If not, please read some alternative installation methods, and extra details below.

Wheels are available for x86 and x64 architectures on Linux and Windows, and for x64 and arm64 on Mac. If pip doesn’t find a wheel for your platform, it will try to compile pygame from source (see below).

pygame requires a «newer» pip. If pygame starts compiling from source and fails, first try upgrading pip.

Raspberry Pi¶

This comes with pygame already installed on the default raspbian installation.

Windows installation¶

Make sure you install python with the «Add python to PATH» option selected. This means that python, and pip will work for you from the command line.

There is documentation with python for the «windows installation steps»

Mac installation¶

Recent versions of Mac OS X require pygame 2¶

If your examples aren’t running and you are using a recent version of Mac OS X; try this line to install pygame instead:

Anaconda Mac¶

(note the w on the end). If it doesn’t work for you, please see the /wiki/MacCompile instructions.

Unix Binary Packages¶

Many Linux and BSD distributions have their own packages of Pygame. These may have an older version of Pygame than the wheels, but have been carefully tested with other packages in that distribution.

Debian/Ubuntu/Mint¶

Fedora/Red hat¶

OpenSUSE¶

Arch/Manjaro

DistributionPython 3 packageDebian/Ubuntupython3-pygameFedorapython3-pygame

FreeBSD also has an active pygame package. While techinicaly it isn’t binary, it is automatically built and installed by the ports manager. See the FreeBSD package page for more information. http://www.freebsdports.info/ports/devel/py-game.html

Gentoo has a builtin package for pygame. This is compiled for your system as it installs, similar to BSD, http://packages.gentoo.org/package/dev-python/pygame

Installing From Source¶

Compilation¶

Compiling and installing pygame is handled by Python’s distutils. Pygame also comes with some scripts to automatically configure the flags needed to build pygame. Use the «setup.py» script to start the installation.

The first time you run the setup script, it will call the «config.py» script. This will build a «Setup» file which stores all the information needed to compile. The «config.py» will do a good job of detecting what dependencies are available and where they are located. If it isn’t perfect, it is easy to build your own, or edit the created «Setup» text file. This «Setup» file is a simple Makefile-like text file. It defines variables needed to use each dependency, and then enables all the pygame modules with found dependencies. If you have trouble compiling, you should be able to easily fix any problems inside the «Setup» file.

Running the «setup.py» script will call distutils to build and install the pygame package. Distutils actually supports a wide variety of compile and install options. running «python setup.py help» will start to show you the different options available. You can change many things like install locations, compiler to use, and more. Calling the «setup.py» script with no arguments and it will just ask you if you want the default flags needed to compile and install.

Windows Compiling Info

You can compile pygame on windows with mingw (gcc for windows) and also with visual studio. Up to date details can be found here: CompileWindows

Unix Compiling Info

Compiling from linux shouldn’t give you any problems. One thing you must keep in mind is that most linux RPM packages separate the actual library from the «dev» files needed to compile. To build you will need to make sure the packages like «SDL-dev» are installed.

You can check to see if SDL is ready to be built from by running the command sdl-config and seeing if it is found. If the sdl-config script is not on the path (or you have more than one?) Set the environment variable SDL_CONFIG to its location.

Sometimes you will have the SDL libraries installed in once location, and the other SDL libraries in another. This tricks the pygame config scripts, but you can help it out by setting the environment LOCALBASE to a path prefix where the other libraries are. The common case for this is SDL installed in /usr and other SDL libs installed in /usr/local. The command for this situation is «LOCALBASE=/usr/local python setup.py install«.

Mac OS X Compiling Info¶

Up to date instructions for compiling on Mac OS X can be found here: MacCompile

In this article, we will learn how to Install PyGame module of Python on Windows. PyGame is a library of python language. It is used to develop 2-D games and is a platform where you can set python modules to develop a game. It is a user-friendly platform that helps to build games quickly and easily.

Follow the steps given below for the successful installation of Pygame

Step 1: Check for Python Installation

In order to install Pygame, Python must be installed already in your system. To check whether Python is installed or not in your system, open the command prompt and give the command as shown below.

If this command runs successfully, and we are able to get a Python version then we are good to go. Otherwise, we have to install Python in our system, to do this refer How to install Python on Windows?

Step 2: Check for PIP installation

PIP is a tool that is used to install python packages. PIP is automatically installed with Python 2.7. 9+ and Python 3.4+. Open the command prompt and enter the command shown below to check whether pip is installed or not.

Step 3: Install Pygame

To install Pygame, open the command prompt and give the command as shown below:

Pygame is successfully installed as shown in the image above.

Step 4: Check Whether PyGame is Working or not

Now open a new terminal and import the Pygame library to see whether it is working fine or not in our system. The library is imported successfully means we got success.

In this way, we can install the pygame module in Python.

pygame 2.1.2

pip install pygame Copy PIP instructions

Released: Dec 27, 2021

Python Game Development

Navigation

Project links

Statistics

View statistics for this project via Libraries.io, or by using our public dataset on Google BigQuery

License: GNU Library or Lesser General Public License (LGPL) (LGPL)

Requires: Python >=3.6

Maintainers

Classifiers

Project description

pygame is a free and open-source cross-platform library for the development of multimedia applications like video games using Python. It uses the Simple DirectMedia Layer library and several other popular libraries to abstract the most common functions, making writing these programs a more intuitive task.

We need your help to make pygame the best it can be! New contributors are welcome.

Installation

If you are just getting started with pygame, you should be able to get started fairly quickly. Pygame comes with many tutorials and introductions. There is also full reference documentation for the entire library. Browse the documentation on the docs page.

Best of all, the examples directory has many playable small programs which can get you started playing with the code right away.

Building From Source

If you want to use features that are currently in development, or you want to contribute to pygame, you will need to build pygame locally from its source code, rather than pip installing it.

Installing from source is fairly automated. The most work will involve compiling and installing all the pygame dependencies. Once that is done, run the setup.py script which will attempt to auto-configure, build, and install pygame.

Much more information about installing and compiling is available on the Compilation wiki page.

Credits

Thanks to everyone who has helped contribute to this library. Special thanks are also in order.

Thanks to those sending in patches and fixes: Niki Spahiev, Gordon Tyler, Nathaniel Pryce, Dave Wallace, John Popplewell, Michael Urman, Andrew Straw, Michael Hudson, Ole Martin Bjoerndalen, Herve Cauwelier, James Mazer, Lalo Martins, Timothy Stranex, Chad Lester, Matthias Spiller, Bo Jangeborg, Dmitry Borisov, Campbell Barton, Diego Essaya, Eyal Lotem, Regis Desgroppes, Emmanuel Hainry, Randy Kaelber Matthew L Daniel, Nirav Patel, Forrest Voight, Charlie Nolan, Frankie Robertson, John Krukoff, Lorenz Quack, Nick Irvine, Michael George, Saul Spatz, Thomas Ibbotson, Tom Rothamel, Evan Kroske, Cambell Barton.

And our bug hunters above and beyond: Angus, Guillaume Proux, Frank Raiser, Austin Henry, Kaweh Kazemi, Arturo Aldama, Mike Mulcheck, Michael Benfield, David Lau

There’s many more folks out there who’ve submitted helpful ideas, kept this project going, and basically made our life easier. Thanks!

Many thank you’s for people making documentation comments, and adding to the pygame.org wiki.

Also many thanks for people creating games and putting them on the pygame.org website for others to learn from and enjoy.

Lots of thanks to James Paige for hosting the pygame bugzilla.

Also a big thanks to Roger Dingledine and the crew at SEUL.ORG for our excellent hosting.

Dependencies

Pygame is obviously strongly dependent on SDL and Python. It also links to and embeds several other smaller libraries. The font module relies on SDL_ttf, which is dependent on freetype. The mixer (and mixer.music) modules depend on SDL_mixer. The image module depends on SDL_image, which also can use libjpeg and libpng. The transform module has an embedded version of SDL_rotozoom for its own rotozoom function. The surfarray module requires the Python NumPy package for its multidimensional numeric arrays. Dependency versions:

License

This library is distributed under GNU LGPL version 2.1, which can be found in the file docs/LGPL.txt. We reserve the right to place future versions of this library under a different license.

This basically means you can use pygame in any project you want, but if you make any changes or additions to pygame itself, those must be released with a compatible license (preferably submitted back to the pygame project). Closed source and commercial games are fine.

The programs in the examples subdirectory are in the public domain.

See docs/licenses for licenses of dependencies.

pygame/pygame

Use Git or checkout with SVN using the web URL.

Work fast with our official CLI. Learn more.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.rst

How to download pygame. Смотреть фото How to download pygame. Смотреть картинку How to download pygame. Картинка про How to download pygame. Фото How to download pygame

pygame is a free and open-source cross-platform library for the development of multimedia applications like video games using Python. It uses the Simple DirectMedia Layer library and several other popular libraries to abstract the most common functions, making writing these programs a more intuitive task.

We need your help to make pygame the best it can be! New contributors are welcome.

If you are just getting started with pygame, you should be able to get started fairly quickly. Pygame comes with many tutorials and introductions. There is also full reference documentation for the entire library. Browse the documentation on the docs page.

Best of all, the examples directory has many playable small programs which can get you started playing with the code right away.

Building From Source

If you want to use features that are currently in development, or you want to contribute to pygame, you will need to build pygame locally from its source code, rather than pip installing it.

Installing from source is fairly automated. The most work will involve compiling and installing all the pygame dependencies. Once that is done, run the setup.py script which will attempt to auto-configure, build, and install pygame.

Much more information about installing and compiling is available on the Compilation wiki page.

Thanks to everyone who has helped contribute to this library. Special thanks are also in order.

Thanks to those sending in patches and fixes: Niki Spahiev, Gordon Tyler, Nathaniel Pryce, Dave Wallace, John Popplewell, Michael Urman, Andrew Straw, Michael Hudson, Ole Martin Bjoerndalen, Herve Cauwelier, James Mazer, Lalo Martins, Timothy Stranex, Chad Lester, Matthias Spiller, Bo Jangeborg, Dmitry Borisov, Campbell Barton, Diego Essaya, Eyal Lotem, Regis Desgroppes, Emmanuel Hainry, Randy Kaelber Matthew L Daniel, Nirav Patel, Forrest Voight, Charlie Nolan, Frankie Robertson, John Krukoff, Lorenz Quack, Nick Irvine, Michael George, Saul Spatz, Thomas Ibbotson, Tom Rothamel, Evan Kroske, Cambell Barton.

And our bug hunters above and beyond: Angus, Guillaume Proux, Frank Raiser, Austin Henry, Kaweh Kazemi, Arturo Aldama, Mike Mulcheck, Michael Benfield, David Lau

There’s many more folks out there who’ve submitted helpful ideas, kept this project going, and basically made our life easier. Thanks!

Many thank you’s for people making documentation comments, and adding to the pygame.org wiki.

Also many thanks for people creating games and putting them on the pygame.org website for others to learn from and enjoy.

Lots of thanks to James Paige for hosting the pygame bugzilla.

Also a big thanks to Roger Dingledine and the crew at SEUL.ORG for our excellent hosting.

Pygame is obviously strongly dependent on SDL and Python. It also links to and embeds several other smaller libraries. The font module relies on SDL_ttf, which is dependent on freetype. The mixer (and mixer.music) modules depend on SDL_mixer. The image module depends on SDL_image, which also can use libjpeg and libpng. The transform module has an embedded version of SDL_rotozoom for its own rotozoom function. The surfarray module requires the Python NumPy package for its multidimensional numeric arrays. Dependency versions:

This basically means you can use pygame in any project you want, but if you make any changes or additions to pygame itself, those must be released with a compatible license (preferably submitted back to the pygame project). Closed source and commercial games are fine.

The programs in the examples subdirectory are in the public domain.

See docs/licenses for licenses of dependencies.

About

pygame (the library) is a Free and Open Source python programming language library for making multimedia applications like games built on top of the excellent SDL library. C, Python, Native, OpenGL.

How to Install Pygame

Pygame is a set of Python modules used for writing simple video games and graphical programs. It is cross-platform, which means it can be installed on both Windows and Mac computers. This guide provides the steps needed to install Pygame for Python 3.6 on Windows and macOS.

Procedure (Windows 10)

When running the Python installer, you will have to select Customize installation. Click Next and check the box next to Install for all users at the top of the list in Advanced Options. You can now click Install.

How to download pygame. Смотреть фото How to download pygame. Смотреть картинку How to download pygame. Картинка про How to download pygame. Фото How to download pygame

Click This PC, select the drive where Windows is installed (usually the C:\ drive), double-click on the Program Files (x86) folder, and double-click on the Python folder (i.e. Python36-32).

How to download pygame. Смотреть фото How to download pygame. Смотреть картинку How to download pygame. Картинка про How to download pygame. Фото How to download pygame

How to download pygame. Смотреть фото How to download pygame. Смотреть картинку How to download pygame. Картинка про How to download pygame. Фото How to download pygame

How to download pygame. Смотреть фото How to download pygame. Смотреть картинку How to download pygame. Картинка про How to download pygame. Фото How to download pygame

How to download pygame. Смотреть фото How to download pygame. Смотреть картинку How to download pygame. Картинка про How to download pygame. Фото How to download pygame

Click on the path in the text box towards the top of the File Explorer window and copy it to the clipboard.

How to download pygame. Смотреть фото How to download pygame. Смотреть картинку How to download pygame. Картинка про How to download pygame. Фото How to download pygame

In the window that appears, click on Enviroment Variables…

How to download pygame. Смотреть фото How to download pygame. Смотреть картинку How to download pygame. Картинка про How to download pygame. Фото How to download pygame

You will need to edit the Path system variable. To do this, select Path in the System variables section of the window and click Edit…

How to download pygame. Смотреть фото How to download pygame. Смотреть картинку How to download pygame. Картинка про How to download pygame. Фото How to download pygame

If entering the previous line into the interpreter does not throw any errors, you have successfully installed Pygame on Windows. You can now write any graphical program you want using the Pygame library.

Procedure (Mac OS X)

This guide is based on an article found (here)

Open a Terminal window. This can be done by pressing command+Space (⌘+Space) and typing Terminal in the search bar and pressing Enter.

How to download pygame. Смотреть фото How to download pygame. Смотреть картинку How to download pygame. Картинка про How to download pygame. Фото How to download pygame

Источники информации:

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *