1、方法1:在终端用pip 直接安装openpyxl模块
2、方法2:在pycharm直接安装点击file ->settingS,找到interpretor,点击右上角绿色加好,输入openpyxl 点击install安装