Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pygame installation fails due to requirement of System Python 2.7, even though I have Python 2.7

I'm trying to install pygame on my mac but I am getting the error

pygame 1.1release can't be installed on this disk.

pygame requires System Python 2.7 to install

pygame requires System Python 2.7 to install

I'm running python 2.7

$ which python
/usr/bin/python
$ python --version
Python 2.7.5

I downloaded pygame from http://pygame.org/download.shtml and selected the file pygame-1.9.1release-python.org-32bit-py2.7-macosx10.3.dmg I'm running osx 10.9.1

Why do I receive this error when I'm running Python 2.7 and how can I successfully install pygame on mac?

like image 324
user784637 Avatar asked Feb 16 '14 02:02

user784637


People also ask

What version of Python is pygame compatible with?

First Check you are using python's latest version or not. Because the PyGame is only supported python 3.7. 7 or higher version so make sure you are using the latest version of python.

Why is pygame not installing?

The Python "ModuleNotFoundError: No module named 'pygame'" occurs when we forget to install the pygame module before importing it or install it in an incorrect environment. To solve the error, install the module by running the pip install pygame command.

How do I install a specific version of pygame?

How do I Install a Specific Version of a Python Package? To install a specific version of a Python package you can use pip: pip install YourPackage==YourVersion . For example, if you want to install an older version of Pandas you can do as follows: pip install pandas==1.1. 3 .

Does Python 3.10 support pygame?

5. Have you installed pygame in your Python 3.10, or are you assuming it is installed because you installed it before? Each Python interpreter normally has its own, separate set of packages. Python doesn't support Pygame.


1 Answers

If you're running 10.9, you will need the MacOS 10.7 build or you can also install using homebrew or just install from source.

I tested installing the 10.7 build on OS 10.9.2 and it worked fine.

Note that you will also probably need to install XQuartz to make it work on latests versions of OSX.

like image 187
stiv Avatar answered Oct 08 '22 22:10

stiv