[英]I can't import openpyxl in visual studio code
I used the command pip3 install openpyxl
, but I'm still getting the error, unresolved import 'openpyxl' .我使用了命令
pip3 install openpyxl
,但我仍然收到错误, unresolved import 'openpyxl' 。
How I can import the library or fix this error?如何导入库或修复此错误?
Enter the currently selected environment in the terminal: ( shortcut keys: Ctrl+Shift+` )I use a virtual environment.在终端输入当前选中的环境:(快捷键:Ctrl+Shift+`)我用的是虚拟环境。
Install the module " openpyxl
" in your currently selected VScode environment:在您当前选择的 VScode 环境中安装模块“
openpyxl
”:
Reopen this file or reload VSCode after installation:安装后重新打开此文件或重新加载 VSCode:
Check the installation:检查安装:
We can see the installation package of the module " openpyxl
" under " .venv
" of the virtual environment used.我们可以看到模块“的安装包
openpyxl
下”,“ .venv
使用的虚拟环境”。
只需打开终端(如 vscode)并输入pip install openpyxl
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.