ModuleNotFoundError: No module named 'openpyxl.cell._writer'
时间: 2023-07-24 16:14:20 浏览: 1549
这个错误通常是因为缺少openpyxl库的某个组件导致的。您可以尝试通过执行以下命令来安装或更新openpyxl库:
```
pip install --upgrade openpyxl
```
如果您已经安装了openpyxl库,可能需要检查其版本并确保它是最新版本。您可以使用以下命令检查已安装的openpyxl版本:
```
pip show openpyxl
```
如果版本不是最新的,可以尝试执行上述更新命令来更新库。
如果问题仍然存在,请确保您的环境中没有其他与openpyxl库有冲突的库,并且您的Python版本与openpyxl兼容。
相关问题
Failed to execute script'老板薪酬肝申器'due to unhandled exception:No module named 'openpyxl.cell._writer'
As an AI language model, I cannot access your local environment. However, based on the error message provided, it seems like there is an issue with the openpyxl module. The error message suggests that the '_writer' module within the 'openpyxl.cell' package is missing or not installed correctly.
To resolve this issue, you can try reinstalling the openpyxl module by running the following command in your terminal or command prompt:
```
pip install --upgrade openpyxl
```
If the issue persists, you can try upgrading pip to the latest version by running the following command:
```
pip install --upgrade pip
```
If none of these solutions work, you may need to provide more information about your code and environment, or seek assistance from a developer or technical support.
No module named 'openpyxl.cell. writer'
这个错误通常是由于pyinstaller打包时没有正确处理openpyxl模块的子模块所致。解决这个问题的方法是使用--hidden-import选项来指定需要打包的子模块。具体来说,你需要在pyinstaller命令中添加--hidden-import=openpyxl.cell._writer选项,以确保openpyxl.cell._writer模块被正确打包。例如:
```
pyinstaller -F main.py -n [程序名称] --hidden-import=openpyxl.cell._writer
```
如果你使用的是其他的openpyxl子模块,你需要将--hidden-import选项中的openpyxl.cell._writer替换为相应的子模块名称。
阅读全文
相关推荐









