What are you "compiling" with? Do you mean that you are packaging it into a 
standalone app with something like py2exe or pyinstaller? If so, what does your 
setup file look like? Its most likely related to missing dependencies. When you 
package libraries that have some substantial .dll deps it can be a bit of an 
extra process to specify them so they are included. 
Pygame apparently has this same situation, where py2exe will list a special 
"recipe" section for it on the wiki. 




On Jul 17, 2012, at 11:19 PM, Christian Akesson <[email protected]> wrote:

> I've written a standalone compiled Python & PyQt program. It is a framework 
> for all things batching, where separate modules can be written outside of the 
> main program and then gets read by the main program.
> 
> One of the things I set it up to do is doing batch jobs with Maya. When 
> developing it in Eclipse, I ran a Python 2.6.4 interpreter (x64) - same as 
> Maya 2012 x64 is running on from what I have gathered. Everything works like 
> a charm inside Eclipse. I compile the program and the moment I run the batch 
> code. which uses mayapy.exe 
> (http://download.autodesk.com/global/docs/maya2012/en_us/PyMel/standalone.html)
>  in a subprocess, I get this error spew:
> 
> Traceback (most recent call last):
>   File 
> "W:/Tools/SOEglobal/python/SOEmayaTools/soe_mayaBatch/commandNodes/export.py",
>  line 6, in <module>
>     from pymel.core import * #@UnusedWildImport
>   File "C:\Program 
> Files\Autodesk\Maya2012\Python\lib\site-packages\pymel\core\__init__.py", 
> line 6, in <module>
>     import pymel.versions as _versions
>   File "C:\Program 
> Files\Autodesk\Maya2012\Python\lib\site-packages\pymel\versions.py", line 12, 
> in <module>
>     from maya.OpenMaya import MGlobal  as _MGlobal
>   File 
> "c:\buildforge\Maya_2012_Win64_Build\build\wrk\optim\runTime\Python\Lib\site-packages\maya\OpenMaya.py",
>  line 7, in <module>
> ImportError: DLL load failed: The specified procedure could not be found.
> 
> If I remove the from pymel.core import * from that module (export.py), it 
> will go into our library and start running the batch. The problem is that we 
> have deeply integrated pymel, so whenever it hits that call in our other 
> modules, I get that same error.
> 
> I've sys.path.append-ed our entire environment manually to make sure it's not 
> an environment thing. I've printed out which python version, bit depth that 
> is being run in both the main program as well as in the mayapy subprocess and 
> they are the same.
> 
> Does anyone have any clue to what could be going on here?
> Running Maya 2012 service pack 2 and  PyMel 1.0.3
> 
> The fact that it runs like a charm when running inside of eclipse has got to 
> be a clue and is really frustrating at the same time :-).
> 
> <image.png>
> 
> 
> 
> /Christian
> -- 
> view archives: http://groups.google.com/group/python_inside_maya
> change your subscription settings: 
> http://groups.google.com/group/python_inside_maya/subscribe

-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe

Reply via email to