1

I'm using ipython, and I copied maya Python API packages from my maya installation directory to the site-packages folder, but when I am trying to import maya.api.OpenMaya, I get a traceback like that:

ImportError           Traceback (most recent call last)
<ipython-input-1-0c6acdfd4e92> in <module>()
----> 1 import maya.api.OpenMaya as om

E:\Python\Lib\site-packages\maya\api\OpenMaya.py in <module>()
     23 # our module, which is called 'OpenMaya'.
     24 #
---> 25 import maya.api._OpenMaya_py2
     26
     27 ourdict = globals()

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

So how can I import the API at ipython instead of at Maya ?

SDC1215
  • 21
  • 4

1 Answers1

0

This is possibly an issue with the Maya API package itself. Recent versions of Maya packages are compiled with Visual Studio 2015, so the DLLs might be incompatible with your Python environment due to compiler differences.

I would also make sure your environment is set up correctly. Instead of copying over files, I would recommend to set the corresponding environment variables instead. Autodesk has a short guide on how to do this for every OS. For Maya 2018: http://help.autodesk.com/view/MAYAUL/2018/ENU/?guid=GUID-83799297-C629-48A8-BCE4-061D3F275215

Tim Lehr
  • 13
  • 4