Hello guest, if you read this it means you are not registered. Click here to register in a few simple steps, you will enjoy all features of our Forum.
Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyGame] Problem importing pygame / installing pygame
#1
import pygame
Error:
File "C:\Python34\lib\site-packages\pygame\__init__.py", 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?
Quote
#2
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
https://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame
Quote
#3
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.
Quote
#4
Sorry i was on a tablet before, and typing on a tablet sucks compared to keyboard.

Quote:pygame-1.9.2a0.win32-py3.2.msi
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
https://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame
if you using
Quote:I am also using the AMD-64 version of Python 3.4.

then you need the one entitled
pygame‑1.9.3‑cp34‑cp34m‑win_amd64.whl

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
cd %HOMEPATH%
pip install /Downloads/pygame‑1.9.3‑cp34‑cp34m‑win_amd64.whl
Quote
#5
It works now! Thanks!
metulburr likes this post
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  [PyGame] Beginner in pygame, I don't know how to use events Erepiv1 1 28 Yesterday, 12:37 PM
Last Post: metulburr
  Pygame keeps quitting Benjipincus 4 116 Dec-20-2017, 02:28 PM
Last Post: metulburr
  [PyGame] Need Help With My PYgame Script ghost0fkarma 2 94 Dec-17-2017, 01:58 AM
Last Post: ghost0fkarma
  Importing pygame Mac problem Benjipincus 1 73 Dec-16-2017, 01:54 PM
Last Post: metulburr
  FYI Pygame high cpu usage. Windspar 2 144 Dec-10-2017, 01:53 PM
Last Post: metulburr
  [PyGame] Beginning PyGame question about "self" jakegold98 2 133 Dec-09-2017, 12:51 AM
Last Post: metulburr
  Python Pygame code help Trajme 1 141 Dec-07-2017, 04:55 PM
Last Post: nilamo
  How to install Pygame chappie 2 124 Dec-06-2017, 10:47 PM
Last Post: chappie
  [PyGame] How much python should I learn before starting Pygame jakegold98 4 126 Dec-06-2017, 10:29 PM
Last Post: Larz60+
  Python Pygame help pause event Trajme 0 120 Dec-06-2017, 09:14 PM
Last Post: Trajme

Forum Jump:


Users browsing this thread: 1 Guest(s)