Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import pygame
File "C:\Program Files (x86)\Python35-32\lib\site-packages\pygame\__init__.py", line 127, in <module>
from pygame.base import *
ImportError: DLL load failed: The specified module could not be found.

- 1,045
- 1
- 9
- 30

- 1
- 1
-
Check the way you installed pygame. – cdarke Jan 02 '16 at 07:32
-
tell me how to install pygame.............i am using pygame-1.9.1.win32-py2.7.......should i have to install it in the same folder as python???? – shubham chauhan Jan 02 '16 at 09:28
3 Answers
Ensure that the version of PyGame you're using matches the version of Python you're using!

- 1
- 3
-
No, I mean that if you're using PyGame for Python 2.6 however you're using Python 2.5 then the PyGame PYD won't be able to find Python, just check if that is correct too! – Palegrave Jan 02 '16 at 18:55
You have not installed Pygame correctly or not in the correct directory/file. What python version do you use and is your computer 32/64 bit? Thx

- 13
- 1
- 5
This is a late answer, but may be it helps someone.
The pygame binary you use should be built for the Python version you have in your system.
In your case, you seem to have 32-bit Python3.5. There is no official pygame binary for Python3.5 yet. But unofficial binaries are available here.
Download pygame-1.9.2b1-cp35-cp35m-win32.whl
from the link (this is the 32-bit version for 32-bit Python3.5), and install it using pip
.
Example: cd
to the folder where you downloaded the .whl file, and run C:\Program Files (x86)\Python35-32\Scripts\pip install pygame-1.9.2b1-cp35-cp35m-win32.whl
Note:
pip
may not play well when the python install directory has spaces. So please install python in a path without spaces. For example, C:\Python35-32
instead of C:\Program Files (x86)\Python35-32
.
Also, see this answer in case you need more info on installing .whl files.

- 1
- 1

- 3,878
- 2
- 34
- 47