I'm trying to install Pygame for python 3.5 32bit. I have learned that I can open the .whl
files provided on the site by using the pip
command. The problem is I've tried multiple ways doing this but with constant error.
python -m pip install pygame-1.9.2a0-cp35-none-win32.whl
'python' is not recognized as an internal or external command,
operable program or batch file.
The file I'm trying to install: pygame-1.9.2a0-cp35-none-win32.whl
My python program is located in my programs folder and everything else works fine.
if you get trouble when install pygame error about missing visual studio 10+. I have the answer: the problem is not about have or not have visual studio, because I try many version but it not work. The problem is file: between tar.gz and .whl so, this is the solution:
1) download file:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame go here and download your pygame version, notice about x64 or x86 and python version. my system is x64 and python is 3.4 so I choose: pygame-1.9.2a0-cp34-none-win_amd64.whl
2) put it in some where to install:
I put it in "C:", so open cmd: and type:
cd C:\
(this changes the location to C:)3) install
done !
You need to add python.exe to your Windows
PATH
variable.The is the system variable that the operating system uses to locate the needed executables from the command line or Terminal windows. [1]
Actually there are many methods to set the
PATH
variable on windows. One way is to typeset PATH=%PATH%;
location path ofPython.exe
into the windows command-line interpreter (cmd):
Now -- before running the
pip command
-- you need to make sure that eitherpygame-1. ... in32.whl
file is locatedor
pip
command.Now you should be able to run your
python -m pip
command after restarting thecmd.exe
.