Search code examples
windows-8pygamepython-3.5

Installing Pygame on Python 3.5 running Windows 8


I cannot install Pygame on my computer which has Python 3.5 and running Windows 8. I have tried to use cmd commands to install it but all I got was an error message saying that pip was not in the system.


Solution

  • One of 3 problems if I have to guess.

    1> Incorrect Directory:

    You are not in the correct directory. The Pygame file needs to be in the directory where you want to extract it to, and to be save, go to the same directory you want to launch it in whilst in CMD command prompt. In CMD type dir pygame* , if you see your pygame file then try to install it.

    Installation line: " python -m pip install --user pygame-1.9.3-cp36-cp36m-win32.whl " change pygame-1.9.3-cp36-cp36m-win32.whl" to your file version in your directory. Don't use this line from the python shell command, rather from command prompt.

    2> Your python and Pygame version are incompatible.

    I suggest you update your Python to latest version and then go to https://pypi.python.org/pypi/Pygame and download the correct Pygame. The number after CP shows which Python version. Thus cp36 means Python 3.6.

    3> Make sure 'python' executes properly in the directory your PIP file is in and that you can launch python from there to shell. If not, then your directory is not added correctly to Python and PythonPath in the Windows environment and needs to be fixed first.