O'Reilly Forums: Import Pygame Importerror:...specified Module Could Not Be Found. - O'Reilly Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Import Pygame Importerror:...specified Module Could Not Be Found. Unable to import pygame

#1 User is offline   AikenLP 

  • New Member
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 04-February 13

Posted 04 February 2013 - 02:34 PM

Running Python 3.3.0 (Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:55:48) [MSC v.1600 32 bit (Intel)] on win32)
Installed Python 3.2 pygame-1.9.2a0
All under Windows 7 Enterprise with SP1

pygame installer: pygame-1.9.2a0.win32-py3.2.msi

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

1. Verified base.pyd located in C:\Python33\Lib\site-packages\pygame
1a. Verified 'C:\\Python33\\lib\\site-packages' in path
>>> sys.path
['', 'C:\\Python33\\Lib\\idlelib', 'C:\\Python32', 'C:\\Users\\<redacted>\\Documents\\Python', 'C:\\Users\\<redacted>\\Documents\\Python\\FW', 'C:\\Windows\\system32\\python33.zip', 'C:\\Python33\\DLLs', 'C:\\Python33\\lib', 'C:\\Python33', 'C:\\Python33\\lib\\site-packages']
2. Commented out "from pygame.base import *" in __init__.py (assumed problem with the file). Results: "from pygame.constants import *" load failed with same error message.
3. Copied base.pyd to C:\Python33\DLLs, assuming subtle path error. No joy.
4. Added specific path to pygame site package (again - No joy.)

>>> sys.path.append('C:\\Python33\\lib\\site-packages\\pygame')
>>> sys.path
['', 'C:\\Python33\\Lib\\idlelib', 'C:\\Python32', 'C:\\Users\\O8992\\Documents\\Python', 'C:\\Users\\O8992\\Documents\\Python\\FW', 'C:\\Windows\\system32\\python33.zip', 'C:\\Python33\\DLLs', 'C:\\Python33\\lib', 'C:\\Python33', 'C:\\Python33\\lib\\site-packages', 'C:\\Python33\\lib\\site-packages\\pygame']

5. User <redacted> is a member of the Administrators group.

6. Found posts where directory and or file permissions may be a culprit. Explicitly defined <redacted> with Full Control on both base.pyd and on each directory up to C:\\Python33 - again, no joy.

We are heavily GPO'ed so I am assuming there's something in a policy somewhere that's causing this. I will try this on my home machine (Windows 7 Home) and see what happens there. But, if you've any insight on what the.... what's going on, I would be much obliged. This has been driving me nutzoid all bloody day.
0

#2 User is offline   #TM# 

  • Active Member
  • PipPip
  • Group: Members
  • Posts: 14
  • Joined: 10-December 12

Posted 05 February 2013 - 08:20 AM

some compiled c extension of pygame 1.9.x is incompatible with python3.x.

I hope the below method will help you.

1. Uninstall the pygame version you have installed. make sure that u have python3.3

2. go to the below link and download the "pygame-1.9.2pre.win32-py3.3.‌exe" if you have 32 bit version of windows 7; else download "pygame-1.9.2pre.win-amd64-py3.3.‌exe" if you have 64 bit windows 7

Link to download pygame

3. Install the version downloaded, enjoy!!

this problem was addressed in this forum previously in case of python3.2

:rolleyes:

This post has been edited by #TM#: 05 February 2013 - 08:21 AM

0

#3 User is offline   AikenLP 

  • New Member
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 04-February 13

Posted 05 February 2013 - 08:36 AM

#TM# - Bless you. Thank you. That took care of it.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users