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
- In Pycharm, open your preferences and find Project Interpreter.
- Next to the drop-down list, click the little [...] icon, and choose Add Local.
- Locate mayapy.exe or mayapy depending on your system. This is found in the bin folder in your Maya installation directory. On Mac it's located under
.../Autodesk/maya2016.5/Maya.app/Contents/bin/mayapy
To make completions work
- Download the Maya developer kit (Google will help you) and extract it to a meaningful location.
- Click the [...] next to the drop-down list again and select More....
- Select your newly added interpreter from the steps above, it will be named
something like
Python 2.7.6 (/path/to/mayapy)
- Click the Paths button in the bottom toolbar
- Click the + sign and locate the folder where you extracted the developer kit. Then navigate to
.../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.