Python播放音乐要使用pygame模块首先安装pygame模块:pip install pygame方法实现:def play_music(self):filepath = r"E:music消愁.mp3";py