1

I'm still really new to the world of programming, so if my question is stupid that's why. I've installed Python and decided I wanted to play around with Pygame a bit. I managed to find this link: http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame that gives me an install for Python 3.6, but I'm not sure what to do with the WHL file.

I tried running 'pip install the.whl' file in command prompt, but it doesn't recognize pip, and then I tried it in IDLE and it says install is invalid syntax. I also tried what the pygame website says to do, which is run 'pip install pygame' to no avail.

Any assistance I could get would be greatly appreciated.

Thank you

Gough
  • 11
  • 3
  • Suggest you learn to always first search this website for related questions before asking one. The odds are often very high that someone else has encountered a similar issue (depending on the nature of the query). – martineau Mar 11 '17 at 21:15
  • pip was probably not added to the PATH variable during the installation of pygame. On Windows you can use the Python launcher and run pip as a module by entering `py -3.6 -m pip install pygame` (replace 3.6 by your Python version) to download and install from pypi. To install a .whl file go to the directory to which you've downloaded it and enter `py -3.6 -m pip install name_of_your_wheel.whl`. – skrx Mar 11 '17 at 21:16
  • I've added this as a new [answer](http://stackoverflow.com/a/42741062/6220679). – skrx Mar 11 '17 at 21:53
  • @skrx I ran what you mentioned and tried to run pip as a module, but now instead of invalid syntax on 'install' I get an invalid syntax error on 'pip'. Is this still a problem related to PATH? – Gough Mar 11 '17 at 22:26
  • @martineau I searched and found answers to this question, but for whatever reason the answers given didn't seem to work for me. Therefore I asked a new question hoping to get some clarification on the subject at hand. – Gough Mar 11 '17 at 22:27
  • You have to enter this in the Windows command-line not in IDLE. In IDLE you can only write Python code and don't install packages. – skrx Mar 11 '17 at 22:34
  • Suggest you append something like "C:\Python\Scripts" (or "C:\Python3\Scripts" as appropriate) to your `PATH` environment variable before running it. That is the directory that contains the `pip.exe` file in current distributions. In the past, `pip` was .py script and you could do things like run it as a module, but no more—it's now an executable. – martineau Mar 12 '17 at 09:34
  • @Gough have you managed to install pygame in the meantime? – skrx Mar 14 '17 at 17:18

0 Answers0