I am trying to get pycharm (latest community edition) working with maya 2015. And the very first thing I need is to be able to reference maya commands module, but I don't seem to be able to find how.
import maya.cmds as cmds
fails with
ImportError: No module named maya.cmds
What do I need to do to get it to work?
I'm on Mac, but the steps should be the same on Windows, only some paths will differ.
Setup the Maya Python interpreter in Pycharm
.../Autodesk/maya2016.5/Maya.app/Contents/bin/mayapy
To make completions work
Python 2.7.6 (/path/to/mayapy)
.../devkit/other/pymel/extras/extras/completion/py/
and hit OK.You should have a working setup with completion.
Based on information from this forum topic.
Edit: If you find it is still not working, ensure you go back into the paths for the interpreter (outlined above), look for, and select, a path called
.../Python/Lib/site-packages
and remove this file (press the - button). This information is also outlined in the above forum link.