Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy
 

How to install PySDL2 via python pip




PySDL2 - Python SDL2 bindings, it belongs to Classifiers:

- License :: OSI Approved :: zlib/libpng License
- License :: Public Domain
- Programming Language :: Python :: 3.1
- Programming Language :: Python :: 3.10
- Programming Language :: Python :: Implementation
- Programming Language :: Python :: Implementation :: CPython
- Programming Language :: Python :: Implementation :: PyPy

When you know about this project and you want to new install PySDL2 to support your project or you get trouble as ModuleNotFoundError: No module named "PySDL2" or ImportError: cannot import name "PySDL2" in your project, let follow this tutorial to install PySDL2



Installation:

Step 1: First, ensure you installed pip in your os, to check pip has been installed on your computer

In Windows (CMD):

py -m pip --version

In Unix/macOS:

python3 -m pip --version

Ensure pip, setuptools, and wheel are up to date:

In Windows (CMD):

py -m pip install --upgrade pip setuptools wheel

In Unix/macOS:

python3 -m pip install --upgrade pip setuptools wheel


Optional - If you want to install in virtual environment:

In Windows (CMD):

- Install virtualenv - if you installed it, please ignore

py -m pip install --user virtualenv

- Create a virtual environment

py -m venv test_PySDL2_env

- Active the virtual environment

test_PySDL2_env\Scripts\active

In Unix/macOS:

- Install virtualenv - if you installed it, please ignore

pip3 install virtualenv

- Create a virtual environment

python3 -m venv test_PySDL2_env

- Active the virtual environment

source test_PySDL2_env/bin/active


Step 2: OK, now, let flow below content to start the installation PySDL2

To install PySDL2 on Windows(CMD):

py -m pip install PySDL2

To install PySDL2 on Unix/macOs:

pip install PySDL2


Step 3: If you want to install a specific PySDL2 version, add ==<PySDL2 version> to the end command line

Example:

pip install PySDL2==0.1.0


Please see the version list below table:

VersionReleased dateCommand
PySDL2 0.9.132022-07-26T18:31:04Windows:

py -m pip install PySDL2==0.9.13

Unix/macOs:

pip install PySDL2==0.9.13

PySDL2 0.9.122022-07-18T16:34:47Windows:

py -m pip install PySDL2==0.9.12

Unix/macOs:

pip install PySDL2==0.9.12

PySDL2 0.9.112022-01-27T15:46:13Windows:

py -m pip install PySDL2==0.9.11

Unix/macOs:

pip install PySDL2==0.9.11

PySDL2 0.9.102022-01-11T22:58:43Windows:

py -m pip install PySDL2==0.9.10

Unix/macOs:

pip install PySDL2==0.9.10

PySDL2 0.9.92021-09-02T19:27:22Windows:

py -m pip install PySDL2==0.9.9

Unix/macOs:

pip install PySDL2==0.9.9

PySDL2 0.9.82021-08-06T16:58:09Windows:

py -m pip install PySDL2==0.9.8

Unix/macOs:

pip install PySDL2==0.9.8

PySDL2 0.9.72020-02-15T12:02:21Windows:

py -m pip install PySDL2==0.9.7

Unix/macOs:

pip install PySDL2==0.9.7

PySDL2 0.9.62017-10-01T09:37:55Windows:

py -m pip install PySDL2==0.9.6

Unix/macOs:

pip install PySDL2==0.9.6

PySDL2 0.9.52016-10-20T19:13:12Windows:

py -m pip install PySDL2==0.9.5

Unix/macOs:

pip install PySDL2==0.9.5

PySDL2 0.9.42016-07-07T20:11:11Windows:

py -m pip install PySDL2==0.9.4

Unix/macOs:

pip install PySDL2==0.9.4

PySDL2 0.9.32014-07-08T19:37:12Windows:

py -m pip install PySDL2==0.9.3

Unix/macOs:

pip install PySDL2==0.9.3

PySDL2 0.9.22014-04-13T07:16:12Windows:

py -m pip install PySDL2==0.9.2

Unix/macOs:

pip install PySDL2==0.9.2

PySDL2 0.9.12014-04-05T08:37:05Windows:

py -m pip install PySDL2==0.9.1

Unix/macOs:

pip install PySDL2==0.9.1

PySDL2 0.9.02014-03-23T08:49:19Windows:

py -m pip install PySDL2==0.9.0

Unix/macOs:

pip install PySDL2==0.9.0

PySDL2 0.8.02013-12-30T11:54:02Windows:

py -m pip install PySDL2==0.8.0

Unix/macOs:

pip install PySDL2==0.8.0

PySDL2 0.7.02013-10-27T08:58:35Windows:

py -m pip install PySDL2==0.7.0

Unix/macOs:

pip install PySDL2==0.7.0

PySDL2 0.6.02013-09-01T12:45:36Windows:

py -m pip install PySDL2==0.6.0

Unix/macOs:

pip install PySDL2==0.6.0

PySDL2 0.5.02013-08-14T07:00:21Windows:

py -m pip install PySDL2==0.5.0

Unix/macOs:

pip install PySDL2==0.5.0

PySDL2 0.4.12013-07-26T15:47:30Windows:

py -m pip install PySDL2==0.4.1

Unix/macOs:

pip install PySDL2==0.4.1

PySDL2 0.4.02013-06-08T18:49:56Windows:

py -m pip install PySDL2==0.4.0

Unix/macOs:

pip install PySDL2==0.4.0

PySDL2 0.3.02013-05-08T05:01:01Windows:

py -m pip install PySDL2==0.3.0

Unix/macOs:

pip install PySDL2==0.3.0

PySDL2 0.2.02013-05-03T05:55:01Windows:

py -m pip install PySDL2==0.2.0

Unix/macOs:

pip install PySDL2==0.2.0

PySDL2 0.1.02013-04-23T18:16:15Windows:

py -m pip install PySDL2==0.1.0

Unix/macOs:

pip install PySDL2==0.1.0


Step 4: Otherwise, you can install PySDL2 from local archives:

Download the distribution file from PySDL2-0.9.13.tar.gz or the specific PySDL2 version in the below list of distribution

After that, install by command:

On Windows(CMD):

py -m pip install <path_to_PySDL2_downloaded_file>

On Unix/macOs:

pip install <path_to_PySDL2_downloaded_file>


List distribution:


Project link:

- Homepage
- Download