Installing Pygame on 64-bit Windows 7 and 64-bit Python 2.7

断了今生、忘了曾经 提交于 2019-12-19 02:21:08

问题


The title says it all. I do see similar questions, someone suggested about http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame, but all the pygame downloadable files are in .whl format which I have no idea how to run on Windows 7. I tried "cd [directory] > pip install [filename]" without success.


回答1:


This worked from me (Windows 7, python 2.7, 64 bit):

pip install C:/Users/ujjwal.karn/Downloads/pygame-1.9.2a0-cp27-none-win_amd64.whl

I downloaded the file pygame-1.9.2a0-cp27-none-win_amd64.whl from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame as well.

In general, whl files are installed with pip:

pip install whatever.whl



回答2:


Open the .whl file through WinRar and just extract the contents(you will find 3 folders) into your Python folder. For example : if you had installed python 2.7.3 in C:, then your directory to extract will be C:\Python27




回答3:


You are doing right. Please just check python command it should display win64

C:>python
Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:43:06) [MSC v.1600 32 bit (In
tel)] on win64 Type "help", "copyright", "credits" or "license" for more information.

if output is win32 install pygame‑1.9.2a0‑cp34‑none‑win32.whl



来源:https://stackoverflow.com/questions/27737264/installing-pygame-on-64-bit-windows-7-and-64-bit-python-2-7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!