Search results
Results from the WOW.Com Content Network
Valid and working pygame installation (at the time of posting), using Conda environments and python 3.10: conda install -c conda-forge pygame Using pip as others have suggested should work (in most cases), but if your aim is to have robust dependencies conda is probably a bit better.
pygame.font.Font() expects a path to a font file as its first parameter, whereas pygame.font.SysFont() expects a string with the name of the font. You can load any TrueType font file (*.ttf) with pygame.font.Font(). To load the font file myfont.ttf in your project directory simply call pygame.font.Font("myfont.ttf", size). Substitute the path ...
Download pygame‑1.9.3‑cp37‑cp37m‑win_amd64.whl if you have a 64-bit Python version or pygame‑1.9.3‑cp37‑cp37m‑win32.whl if you have a 32-bit version. Then open the command-line, navigate to the directory that contains the wheel file and install it with pip:
Go here and download pygame-1.9.2a0-cp35-none-win32.whl Move the downloaded .whl file to your python35/Scripts directory Open a command prompt in the Scripts directory ( Shift - Right click in the directory > Open a command window here )
Download the appropriate interpreter with PyGame included. Open your PyCharm IDE (Make sure it is up to date) Go to File. Press Settings (Or Ctrl + Alt + S) Double click on the option that looks like Project: Name_of_Project. Click on Project Interpreter. Choose the interpreter you want to use that includes PyGame as a module. Save your options
To install pygame you need to write the command: pip install pygame. in your command prompt, if that does not work try: pip3 install pygame. If that fails, make sure to install python from this link. Make sure to add python and pip to your environment path. Restart your computer and then try again!
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: import pygame Please note that these are not official binaries and you are basically trusting a third-party to compile and provide the binary for you.
Next you need to install pygame with pip install pygame in your cmd - run it as administrator just to be safe. If you receive errors try updating pip with python -m pip install --upgrade pip. Now create and save a new python file. Import pygame in that file by using the code import pygame. The output should be:
I'm on Windows 10 on an Asus. I'm using python 3.8. I installed successfully pygame on another computer (lenovo yoga, same OS) and worked fine. Then I tried to install the same package on this comp...
I'm having trouble using the pygame module in my code. I installed pygame using the command py -3 -m pip install pygame --user and it said it was successful. However, when running my code, I get this