1

Trying to run the following in VSCode:

from tabulate import tabulate
table = tabulate([["value1", "value2"]], ["column 1", "column 2"], tablefmt="grid")
print(table)

But I get this exception:

Exception has occurred: ImportError cannot import name 'tabulate'

My launch.json looks like this:

    {
        "name": "Python: Current File (Integrated Terminal)",
        "type": "python",
        "request": "launch",
        "program": "${file}",
        "console": "integratedTerminal"
    }

I have tried what was suggested here but it did not work. I am not running in a virtualenv. And it is not a problem with tabulate because the same issue arises with other modules. Also, I know tabulate is properly installed because the code above compiles just fine when I run it in the WingPersonal IDE. Any ideas?

T. Fo
  • 199
  • 2
  • 6

0 Answers0