0

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
  • 43,040
  • 110
  • 45
  • 72
Diego
  • 3
  • 1
  • 2
  • 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

1
  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
  • 7,195
  • 1
  • 13
  • 22