1

I used the command pip3 install openpyxl, but I'm still getting the error, unresolved import 'openpyxl'.

How I can import the library or fix this error?

Adrian Mole
  • 49,934
  • 160
  • 51
  • 83
Diego
  • 13
  • 1
  • 1
  • 3
  • Does this answer your question? [Pylint "unresolved import" error in Visual Studio Code](https://stackoverflow.com/questions/53939751/pylint-unresolved-import-error-in-visual-studio-code) – Akif Oct 04 '20 at 17:06

1 Answers1

2
  1. Enter the currently selected environment in the terminal: ( shortcut keys: Ctrl+Shift+` )I use a virtual environment.

    enter image description here

  2. Install the module "openpyxl" in your currently selected VScode environment:

    enter image description here

  3. Reopen this file or reload VSCode after installation:

    enter image description here

Check the installation:

We can see the installation package of the module "openpyxl" under ".venv" of the virtual environment used.

enter image description here

Jill Cheng
  • 9,179
  • 1
  • 20
  • 25