Search code examples
pythonpygamepython-module

I can not install the Pygame module


I tried to install pygame module but first I needed to update my pip, so I did it via this code

 pip install --upgrade pip

then I tried to install pygame with this code

pip3 install pygame 

And

pip install pygame

once I did that it gave me an error message starting with

  ERROR: Command errored out with exit status 1:
 command: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 

tried to install other modules and it went just fine.

I use vs code and I use a MacBook.


Solution

  • NOTE: Pygame might not be compatible with Python 3.8, try other versions of Python

    Depending on if you are using Linux distros or MacOS, a 'sudo' might be needed at the start.

    Try installing pygame with just 'pip' instead of 'pip3'.