So I have this little problem. When I try to install PyGame for Python 3.4 I download a .whl (wheel?) file and don't know how to use it. Some guys told me something about pip but don't know how to use/install it.
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
Here is a great VIDEO tutorial: http://goo.gl/PurJqk (it is on youtube)
This is what I use to install .whl modules to python (I do this in the 64 bit windows cmd):
(assuming that you have the .whl file on your desktop)
(where filename.whl is the full name of the .whl file, with the .whl extension)
After that it will install, and you are free to use PyGame!
Step 1
If you have not got python version 3.4.2, then you must uninstall your current version of python (or don't if you don't even have python).
Step 2
Then download and install python 3.4.2 from http://filehippo.com/download_python/58901/ .
Step 3
Follow the instructions and wait until it is ready for use.
Step 4
Now download the 'pygame-1.9.2a0-cp34-none-win32.whl' file from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame and copy it into C:\Python34\Scripts .
Step 5
In C:\Python34\Scripts hold the shift key and right click. Click on 'Open new command window here'.
Step 6
In the command window you have opened, type in:
It will say something like:
And it will then just say C:\Python34\Scripts>, which means that pygame has now been installed!
Step 7
Go to the Python 3.4.2 Shell, and type in:
- if there is an error, pygame didn't install properly, otherwise, congratulations! You can then:
- and then on the next line type in:
- to see a professional pygame example.
For more information, visit my website at: http://pygameinstall.neocities.org/
Good Luck! :)
https://bitbucket.org/pygame/pygame/downloads
"pygame-1.9.2a0-hg_5974ff8dae3c+.win32-py3.4.msi"
This is the package you want, RedNax said this but did not point out the exact package.
For linux if you root user then copy paste this into terminal
If you not root user then use sudo before start every-line.
Here is a link to download pygame for different versions of Python, up to Python 3.4 in 32 bit and 64 bit.
To test if it installed properly, open your python shell and type in this code:
Please note that these are not official binaries and you are basically trusting a third-party to compile and provide the binary for you.
14 y/o? Good for you! You can put the file into your
python/scripts
folder and runpip install *file*
(where*file*
is your filename).