Pygame installation error - python

I have installed Python 3.4.0 on a Win Vista Home Premiun 32bit machine with "Service Pack 2" installed.
Python installed to C:\Python34
I then chose the pygame windows binary pygame-1.9.2a0.win32-py3.2 since this is the closest to Python 3.4.0.
When in the shell or via a .py file and I use from pygame import *, I get the following error:
*Traceback (most recent call last):
File "C:/Users/Stuart/Desktop/Python Project files/g.py", line 1, in <module>
from pygame import *
File "C:\Python34\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.*

I found a pygame install for python 3.4 at http://www.lfd.uci.edu/~gohlke/pythonlibs/

Related

from .cv2 import * ImportError: DLL load failed: The specified module could not be found

I used to play with opencv but now I am not able to use it. When I enter :
import cv 2
I get
import cv2
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
import cv2
File "C:\Program Files\Python36-32\lib\site-packages\cv2\__init__.py", line 3, in <module>
from .cv2 import *
ImportError: DLL load failed: The specified module could not be found.
I have 32 bit Windows 7 and Python 3.6.
I had an issue that really looked like this one.
I installed OpenCV on an conda envrionement and someone had installed numpy unsing pip on the base environment.
Please check that:
all your installed package come from compatible sources
You don't have the same package installed twice
The only way that I could fix the issue was starting from a fresh environment.
Hope it helps

Importerror no module named vtk

I'm trying to run a Python.py file with:
import vtk
but, I get the error:
Traceback (most recent call last):
File "CYLINDER.py", line 6, in
import vtk
ImportError: No module named vtk
Steps I've taken:
Compiled VTK 7 following these instructions: http://www.vtk.org/Wiki/VTK/Building/Windows#Step_7_-_Manual_building (no failures)
Changed PYTHONPATH variables: http://www.vtk.org/Wiki/VTK/Tutorials/PythonEnvironmentSetup
Currently running Python 2.7.11 32-bit, compiled using CMake and Visual Studio 2010, and using cygwin for windows
Thank you in advance for your help.

Python ImportError: DLL load failed: The specified module could not be found

I recently downloaded and installed pygame. I tested it with the following code.
import pygame
I received the following error:
C:\Python34>python test.py
Traceback (most recent call last):
File "test.py", line 1, in <module>
import pygame
File "C:\Python34\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.
I currently have Python 3.4 32 bit and have downloaded pygame-1.9.2a0.win32-py3.2 and installed it. I tried uninstalling and reinstalling multiple times. What am I doing wrong?
Pygame doesn't work for Python 3.4. The pygame that you downloaded is for Python 3.2. If you download Python 3.2, you should be able to use pygame.

Pygame installed, but not working

I am using a mac and i want to use pygame but it is not working.
this is the error i get when I try to do import pygame
Traceback (most recent call last):
File "<pyshell#6>", line 1, in <module>
import pygame
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/__init__.py", line 95, in <module>
from pygame.base import *
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/base.so, 2): no suitable image found. Did find:
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/base.so: no matching architecture in universal wrapper
Please help I am using python 2.7.9
If your file name is called pygame.py the system imports your python file.
If your file name is not pygame.py, you can try doing pip install pygame or python -m install pygame.

wxPython for Python 2.4.3 on Windows 7

My company server uses Python 2.4.3. I need to use wxPython, but current version of wxPython requires either Python 2.6 or 2.7.
How do I get wxPython to work with Python 2.4.3 on Windows 7?
http://www.wxpython.org/download.php
P.S. I tried installing "wxPython2.8-win32-unicode-py26" and import wx, but got the following error:
Traceback (most recent call last):
File "<pyshell#0>", line 1, in -toplevel-
import wx
File "C:\Python24\Lib\site-packages\wx-2.8-msw-unicode\wx\__init__.py", line 45, in -toplevel-
from wx._core import *
File "C:\Python24\Lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line 4, in -toplevel-
import _core_
ImportError: DLL load failed: The specified module could not be found.
Ok so I figured it out.
Since "wxPython2.8-win32-unicode-py26" (wxPython 2.8.12.1) requires Python 2.6, it would not work if I have Python 2.4.
So I found wxPython 2.8.10.1 which supports Python 2.4, installed it and it works!

Categories

Resources