Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyGame] Problem importing pygame / installing pygame
import pygame
File "C:\Python34\lib\site-packages\pygame\", line 95, in <module> from pygame.base import * ImportError: DLL load failed: %1 is not a valid Win32 application.
Uh? I'm using Windows Vista, Python 3.4.3 and PyGame 1.9.2 (i think designed for 3.2 but im not sure)
I installed it to the directory listed in the error. Should I move it somewhere else?
What was your method of installation for pygame?

it might be a 32/64 bit issue. Whatever your python is, pygame must be also. However python doestn have to be whatever your OS is either.

You cna also
pip install pygame
or install pygame through
I got it from PyGame's website, the installer is named pygame-1.9.2a0.win32-py3.2.msi. I installed it, again, in the directory seen in the error. Also, for your pip install method, where should I enter it?
For your second alternate, what is a .whl file? Where would I put it? What would I open it with?
I am also using the AMD-64 version of Python 3.4.
EDIT: Now that I look over it, I think it is a 64/32 clash. I'll get another install.
Sorry i was on a tablet before, and typing on a tablet sucks compared to keyboard.

win32 means 32 bit, py3.2 means for python3.2 version.
Quote:I am also using the AMD-64 version of Python 3.4.

Your using 64 bit python3.4 but your installing a 32 bit pygame for python3.2

First of all uninstall that pygame as it is the wrong version and wrong bittype

secondly before doing wheels, you can simply try to type this in your OS command prompt exactly like...
pip install pygame
and try that first as pip is suppose to install the proper version for you.

If that fails...

To install a wheel
pip install wheel
Which is in the command prompt of your operating system. IF you install python correctly, it will know what pip is

from here
if you using
Quote:I am also using the AMD-64 version of Python 3.4.

then you need the one entitled

then do
pip install pygame‑1.9.3‑cp34‑cp34m‑win_amd64.whl
of if its in your downloads
pip install C:/Users/USERNAME/Downloads/pygame‑1.9.3‑cp34‑cp34m‑win_amd64.whl
or whatever the proper path to downloads is in windows
or for path
pip install /Downloads/pygame‑1.9.3‑cp34‑cp34m‑win_amd64.whl
It works now! Thanks!
metulburr likes this post

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Buttons in PyGame mzmingle 4 148 Oct-09-2018, 05:19 PM
Last Post: Mekire
  Annoyance - Newer version of pygame nilamo 22 450 Sep-29-2018, 03:03 AM
Last Post: metulburr
  PyGame: detecting key press, but not key qrani 2 71 Sep-28-2018, 11:08 PM
Last Post: qrani
  [PyGame] Converting PyGame 2 axis joystick float to 360 angle archieab 1 78 Sep-26-2018, 05:40 PM
Last Post: archieab
  [PyGame] Using joystick module from PyGame archieab 6 144 Sep-25-2018, 06:13 PM
Last Post: archieab
  Pygame Class Sprite Placement Confusion TheHumbleIdiot 2 137 Sep-11-2018, 02:19 PM
Last Post: TheHumbleIdiot
  Pygame Groups microphone_head 4 265 Aug-28-2018, 10:40 PM
Last Post: microphone_head
  Coding problem in a Pygame Sghet 4 630 Aug-13-2018, 05:39 PM
Last Post: MTGReen
  Classes Pygame Help sam57719 2 364 Jul-10-2018, 03:23 AM
Last Post: metulburr
  [PyGame] Why didn't my installation of pygame work? JohnJSal 4 404 Jul-01-2018, 08:26 PM
Last Post: JohnJSal

Forum Jump:

Users browsing this thread: 1 Guest(s)