Reputation: 11
I want to import pygame successfully, but this problem arises. I tried re-installing 'pygame' but it's not working (Windows 7 64 bit).
import pygame
I expect that the import error should not arise, but it shows
Traceback (most recent call last): File "D:\IP\Snake Game PYTHON\SnakePython\Food.py", line 2, in <module>
import pygame File "C:\Users\WELCOME\AppData\Local\Programs\Python\Python36-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
Upvotes: 1
Views: 277
Reputation: 729
It seems you haven't installed the library properly. Navigate to your python install directory and in the Scripts
folder, shift+right click and open CMD in the directory.
In the command line write:
pip3 install pygame
That should install the library i think.
Upvotes: 1