First, click File, find a setting Settings ...
Click pycharm in the "Settings"
After clicking Project: python in Project Interpreter, can not generate class diagrams of the reasons I'm here is because there is no choice compiler)
choose to have the installation python.exe folder path.