PyGame Installation


#1

Hi, Need help to install PyGame module for Maya 2016 x64.

I downloaded 64bit PyGame Lib from Christoph Gohlke PY LIB
site and i installed successfully in “C:\Python27” using “pip install *.whl” command.
After that i copied PyGame folder from “C:\Python27\Lib\site-packages” & paste in “C:\Program Files\Autodesk\Maya2016\Python\Lib\site-packages”.

And then run import pygame in Maya script editor & got below error…


 

# Error: ImportError: file C:\Program Files\Autodesk\Maya2016\Python\lib\site-packages\pygame\__init__.py line 142: DLL load failed: The specified module could not be found. # 



 

#2

Can you get to it through a normal (non maya) python shell?


#3

Yeah it works fine in python shell.


#4

sounds like the module relies on 3rd party dependencies that you didn’t copy over into maya’s sourced directories. In this case, a .dll file. If you needed pip to install it, it probably installed a bunch of other files in a lib folder, that won’t exist in site-packages.


#5

Above guess is pretty likely. You can add wherever that dll is to the system path for libs, or toss it in some windows/system directory.


#6

To chck dependencies of pygame, i run “pip show pygame” in cmd prompt and got result like this.

c:\Python27\Scripts>pip show pygame
---
Metadata-Version: 2.0
Name: pygame
Version: 1.9.2a0
Summary: Python Game Development
Home-page: http://www.pygame.org
Author: Pete Shinners, Rene Dudfield, Marcus von Appen, Bob Pendleton, others...

Author-email: pygame@seul.org
License: LGPL
Location: c:\python27\lib\site-packages
Requires:

is there any other way to query dependencies ??


#7

Here is Error report by dependency Walker by pointing base.pyd

Error: At least one required implicit or forwarded dependency was not found.
Warning: At least one delay-load dependency module was not found.
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.