1

When I run pip install pygame, it downloads it for python 2.7. I need it for python 3.6. I tried downloading pygame form the website and still I can’t import it in idle. Is there someway I can direct pip to install under the correct version?

I used pip -V to find my pip version and got this: pip 9.0.1 from c:\python27\lib\site-packages (python 2.7)

Caleb H
  • 21
  • 4
  • `pip3 install pygame`? Or use a virtualenv. – jonrsharpe Mar 05 '18 at 11:49
  • I was just about to add that when I do this I get this message: fatal error in launcher:unable to create process using ' '' ' – Caleb H Mar 05 '18 at 11:59
  • Possible duplicate of [How to run pip of different version of python using python command?](https://stackoverflow.com/questions/34803040/how-to-run-pip-of-different-version-of-python-using-python-command) – phd Mar 05 '18 at 14:10

2 Answers2

1

More information about your operating system would be helpful. Is there a pip3 program on your system? If so then try to use it with pip3 install pygame

Daniel
  • 141
  • 1
  • 10
  • I'm running windows 10. I'm not sure if pip3 is on my system or not. If I run pip from the command prompt it gives me the expected output, but that could be the 2.7 pip right? – Caleb H Mar 05 '18 at 12:04
  • @caleb-h You can check that by using `pip --version`. Ok, when you use windows pip3 might not work. That was my first linux answer. Under windows you can have a look at your path with (I think) `echo %PATH%` to see all your executable folders. Also the order matters. If you see"C:\Python27;C:\Python36" (and assuming there are the python.exe files) windows will use python2.7 instead of python3.6. Oh, I just saw your edit: yes that's the pip2.7 – Daniel Mar 05 '18 at 13:08
1

I was able to download the correct pygame by using

python3 -m pip install 
Caleb H
  • 21
  • 4