PDA

View Full Version : Python Enviornment variable problem


inder3d
05-06-2010, 06:09 PM
Hi
I m trying to execute simple program in python but he will display the error :

Traceback (most recent call last):
File "C:/Python25/test.py", line 1, in <module>
import maya.standalone
ImportError: DLL load failed: The specified module could not be found.

I m also create enviornment variable :
MAYA_LOCATION - C:\Program Files\Autodesk\Maya2008\
PYTHONPATH - C:\Program Files\Autodesk\Maya2008\Python\lib\site-packages

but that doesnt work
if any one know about this pls tell me.

misterbk
05-08-2010, 08:21 PM
I believe you need to match the architecture between Maya and Python. Have you installed the correct Python?

i.e. for 32-bit Maya you can use 32-bit Python. For 64-bit Maya you must use 64-bit Python.

If you've matched those up, try using sysinternals ProcMon to make sure Python is looking in the correct place for the DLL.

It may be you need to use Maya's Python interpreter and not a separate one, I don't really know.

You could try finding Program Files\Autodesk\MayaXXX\bin\mayapy.exe and using that interpreter to run your script.

Could also try copying the contents of MayaXXX\Python\Lib\Site-Packages to the other Python inerpreter's Site-Packages folder.


Hopefully that helps at least a little... I have not tried to import maya.standalone myself so I'm taking some stabs in the dark.

sundialsvc4
06-23-2010, 01:02 PM
In a Windows environment, you might see entries in the Application section of the "Event Log Viewer." (See Administrative Tools.)

The Python web-site also contains information to assist in resolving problems in "embedded" deployments such as this one. There can be several reasons, one of which certainly is that, even though the module could be found, it could not be loaded, or if, once loaded, it did not pass muster. The messages are not always specific enough.

Please do follow-up with threads like this to explain to others how you solved your problem, and where you went for information. Please bring such threads to closure so they become a useful resource to those who "stumble upon" them later. Include specific application and Python version-information so that future readers can determine if the thread applies to their case.

CGTalk Moderation
06-23-2010, 01:02 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.