Question:
I cant import pygame onto python correctly. Please Help?
Sean
2011-03-18 17:55:36 UTC
Ok so I got •Python 2.7.1 Windows and installed pygame-1.9.1.win32-py2.5.msi. I typed import pygame onto the python IDLE but I use to get an error message that said-
Traceback (most recent call last):
File "", line 1, in
import pygame
ImportError: No module named pygame
so then I manually moved each file to the right place and now I type in import pygame and get-
Traceback (most recent call last):
File "", line 1, in
import pygame
File "C:\Python27\lib\site-packages\pygame\__init__.py", line 95, in
from pygame.base import *
ImportError: DLL load failed: The specified module could not be found.
Please tell me what to do. And also dont tell me to uninstall it and reinstall the same one becuase i have done that a couple of times.
Thanks!
Three answers:
Jack Trades
2011-03-19 20:40:41 UTC
I don't have a windows box to test this on right now, but I did notice that you are using Python 2.7.1 and the version of pygame is for Python 2.5.



The download page from pygame states that pygame for 2.7 is available as a pre-release.



http://www.pygame.org/download.shtml
?
2016-11-09 09:20:25 UTC
Import Pygame
hazelzet
2017-03-01 15:47:00 UTC
i mentioned you're iterating over FileOpen and analyzing from it with the readlines() gadget which atleast in Python 2 ought to prefer to furnish you an errors asserting: "ValueError: blending technologies and study techniques ought to lose practise". additionally the readlines technique returns a itemizing of each and every and all of the strains indoors the checklist. additionally, you're using the 'w' (write mode) to open the checklist even nevertheless your ultimate analyzing from it it extremely is undesirable be wide awake and deceptive. finally, i'm now now no longer specific what the variables TeamGK and TeamRB are in spite of in the event that they're many situations international, so i'm now now no longer specific what the rationalization of the excellent 2 strains are in spite of in the event that they do in certainty now no longer look suitable. an extra component is, effective aspects are lowercase with words separated by potential of using underscores. variety names are capwords. it relatively is the Python convention and distinctive variety must be complicated to a Python programmer. i will have have been given to be sure extra beneficial effective of your code to advise a suitable restoration. If which you would be waiting to post the comprehensive script in pastebin and placed a hyperlink indoors the extra beneficial effective practise.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...