You should open the terminal inside the VSCode and install the modules you want. something like👇

if that's not you meant, please let me know.
Answer from Mithilesh on Stack OverflowYou should open the terminal inside the VSCode and install the modules you want. something like👇

if that's not you meant, please let me know.
- First of all I would advise you to select the current Python version you have. It has been explained here:
VSCode: There is no Pip installer available in the selected environment
- Next, you should check is the pip installed in your Python main directory or not, by checking how to do on this website:
https://pip.pypa.io/en/stable/installing/
or this thread
How to use pip with Visual Studio Code
by typing
py -m pip
in your terminal, like
C:\Users\m\Desktop\Python> py -m pip
You should have the list of commands and general options which can be used. One of them is install
On the Python library platform, you always have the command to be copied in order to the installation of package you want.

In your terminal, the initial command should look as:
PS C:\Users\m\Desktop\Python> py -m
to which you should append the command prepared on the Python library platform (by copying it and pasting).
C:\Users\m\Desktop\Python> py -m pip install openpyxl
That's it. The package should be installed in your Python folder, what you will see in the terminal.
If everything is alright, you just need to type
import openpyxl #or other package name, which you downloaded
and use it!
How to install Python packages for a VS Code virtual environment? - Stack Overflow
How to install packages on VS Code
How to import library in VS CODE
VSCode isn't Recognizing Python Modules?
Hello! I'm completely brand new to any type of programming and am taking a coding class now to get introduced to it.
As part of my final project I need to make a program with astropy and numpy, but I have no idea how to install it in VS Code, which is what I've been using all semester. Whenever typing the normal install codes others have described in other posts, it gives me a syntax error. I have Python 3.13.3 installed, and that's the version it said it uses.
This whole thing is very confusing for me, so I hope it's not some small stupid mistake I'm making, but any help would be greatly appreciated
After the environment creation you must select the new interpreter (ctrl+shift+P). If it is not listed, then search it using "+ Enter interpreter path..." option and select the venv installation path.
After environment selection you must open a new terminal and if the environment is correctly activated, then you should see the environment name as first string of each new terminal line. Your new environment is ready to be modified!!
Now you can install any lib you need by the terminal when your env is activated, using (if windows OS) py -m pip install <lib_name>.
Remember that your current interpreter is defined by the first string of each new line in your terminal (before the current path). If no env name is printed it means you are using the global interpreter.
Below is the link for reference documentation :-
https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/#creating-a-virtual-environment
To create virtual enivornment named env:-
py -m venv env
To activate enivornment:-
.\env\Scripts\activate
For installing module check if pip is upto date or run
python.exe -m pip install --upgrade pip