No module named 'prettytable'

70 views Asked by At

I have an issue with importing prettytable in VS code, even though I installed prettytable using

pip install prettytable

I got the error

No module named 'prettytable'

I tried pip install prettytable -U but no result.

1

There are 1 answers

0
Will C On

Have you tried creating and activating a virtual environment before pip or pip3 installing prettytable? (Also try upgrading pip with the command: pip install --upgrade pip)

On Mac (create virtual environment) Command: Python3 -m venv env (activate virtual environment) Command: source env/bin/activate.

On Windows (create virtual environment) Command: Python3 -m venv env (activate virtual environment) Command: env\Scripts\activate.