In the main screen select configure > preferences:
Open ‘Project Interpreter’:
Click on the Gear icon and ‘Add’
Select ‘System Interpreter’
Then click the … button and navigate to and select the file:
/applications/Autodesk/maya2018/Maya.app/Contents/bin/mayapy
Click ok
You should now see the maya python 2.7 interpreter:
Open the gear icon again and click “Show all”
Then click on the small folder structure icon:
In the next window click the ‘Add’ icon
Navigate to:
/Applications/Autodesk/Maya/devkit/other/pymel/extras/completion/py
And click ok:
Then click ‘OK’ again
Then in the project interpreter window click Apply:
Then OK
PyCharm should now be set up to use the Maya python library with autocomplete!