I have installed Pygame with the file pygame-1.9.2a0.win32-py3.4.msi in the folder C:\\Python34\\Lib\\site-packages\\Include (Python 3.4) on my Windows 7 OS. When I try to import it using import pygame
it shows the following error message:
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
import pygame
ImportError: No module named 'pygame'
When I use LiClipse and include the folder C:\\Python34\\Lib\\site-packages\\Include in the pythonpath under External Libraries, there is no error message for import pygame
anymore, but when I use pygame.init()
I get the following error message
pygame.init()
AttributeError: 'module' object has no attribute 'init'
Did I install it into the correct folder, have I set the right folder in LiClipse (or should I have to set a folder in the first place), and what can I do to get this to work?
Have you tried doing pip install? This link might explain what you need to do.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.