How to tell VS Code to import a library from an existing venv?

45 Views Asked by At

I was studying about Oriented Programming and just arrived in a topic of the course that uses the library 'prettytable' to show that is possible to make ASCII tables without so much effort. The problem is that I'm trying to import this library from my venv space and it's not working

# how to create a virtual envirionment:
#
# python -m venv C:\Users\apleu\Desktop\Python\Python\Day_16\venv
# Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process
# venv\scripts\activate
# pip install PrettyTable

import prettytable

I'm using python 3.11.4

Image of my code ambient

I watched some videos and searched some solutions but none of them worked.

0

There are 0 best solutions below