1. Open pycharm
2.File——settings——Plugins
3. Search for maya, and find mayacharm. Click Install
4. Then restart, restart pycharm.
5. Open settings——mayacharm, there is an interface in it, copy the interface into the maya code, and run this interface in the maya code box (select the interface code and press ctlr+enter)
6. At this time, there are 3 more buttons in the next run, which are used to link maya
7. Create a new .py file in pycharm, write a piece of code casually, then select the code, press Alt+s, the code will automatically run in maya.