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 Overflow
🌐
Visual Studio Code
code.visualstudio.com › docs › python › python-tutorial
Getting Started with Python in VS Code
November 3, 2021 - During the course of this tutorial, you learned how to create a Python project, create a virtual environment, run and debug your Python code, and install Python packages. Explore additional resources to learn how to get the most out of Python in Visual Studio Code!
Discussions

How to install packages on VS Code
Use the terminal window on the bottom of vscode. Don't put the command in your code. pip install numpy or py -m pip install numpy (if that does not work tell us what OS you are using) More on reddit.com
🌐 r/learnpython
11
6
July 6, 2025
How to set up python on vs code
I would suggest that you start off with Thonny IDE, as it requires virtually no "setting up", and even includes Python so that you don't need to set up Python either. It's a great IDE for beginners. When you have outgrown Thonny you will know a lot more about Python, so setting up vscode or PyCharm should be a lot easier for you. More on reddit.com
🌐 r/learnpython
13
10
October 17, 2024
How to install Python libraries to run in VSCode
You don't have to, but you should, create a venv for every project you work on. Your dependencies are going to vary wildly from one project to the next. // create a venv $ python -m venv venv // activate the python interpreter inside of it $ ./venv/bin/activate // install your requirements (venv)$ pip install seaborn More on reddit.com
🌐 r/learnpython
2
1
September 1, 2023
Is there a Python package manager for Visual Studio Code?
However, in VSC you have to use pip which may point to another interpreter Well, don't let your pip point to a different interpreter's packages directory, is the answer here. If your pip and your python don't agree on where packages go then your environment is broken and you should fix it. If you want to browse packages go to https://pypi.org/ . Typically when you want to install a package you already know exactly which one. More on reddit.com
🌐 r/learnpython
5
1
March 25, 2020
People also ask

How can I configure VSCode to use a specific Python interpreter for different projects?

You can specify a Python interpreter for each project by selecting the interpreter in the Command Palette (Ctrl+Shift+P) using the command "Python: Select Interpreter". This setting is saved in the project's .vscode/settings.json.

🌐
datacamp.com
datacamp.com › home › tutorials › python › setting up vscode for python: a complete guide
Setting Up VSCode For Python: A Complete Guide | DataCamp
How do I set up VSCode to format Python code on save using Black?

To set up VSCode to format Python code using Black, go to Settings and search for "Python formatting provider", select "black", and ensure "Editor: Format On Save" is enabled.

🌐
datacamp.com
datacamp.com › home › tutorials › python › setting up vscode for python: a complete guide
Setting Up VSCode For Python: A Complete Guide | DataCamp
What are some recommended extensions for Python data visualization in VSCode?

For data visualization, extensions like Plotly for Visual Studio Code and Jupyter Notebook Renderers can enhance your experience by providing interactive plots and rendering capabilities.

🌐
datacamp.com
datacamp.com › home › tutorials › python › setting up vscode for python: a complete guide
Setting Up VSCode For Python: A Complete Guide | DataCamp
🌐
Reddit
reddit.com › r/learnpython › how to install packages on vs code
r/learnpython on Reddit: How to install packages on VS Code
July 6, 2025 -

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

🌐
Visual Studio Code
code.visualstudio.com › docs › languages › python
Python in Visual Studio Code
November 3, 2021 - You must install a Python interpreter yourself separately from the extension. For a quick install, use Python from python.org and install the extension from the Visual Studio Marketplace.
🌐
MkrGeo
astro-geo-gis.com › home › miscellaneous › installing python package in visual studio code
Installing Python package in Visual Studio Code – Astro-Geo-GIS
For installation of the Python package in Visual Studio Code you just need the Python extension, which should be installed at the very beginning.
Published: May 28, 2025
🌐
Quora
quora.com › Which-pip-command-can-I-use-to-install-Python-packages-in-VS-Code
Which pip command can I use to install Python packages in VS Code? - Quora
Answer: “pip install ” This command needs to be run in a terminal (or command prompt on windows). To get this in VS Code, go to the “Terminal” option in the top bar, and then click “New Terminal”. You may need to use “pip3” instead of “pip”, so if pip doesn’t work give ...
Find elsewhere
🌐
Visual Studio Code
code.visualstudio.com › docs › python › environments
Python environments in VS Code
November 3, 2021 - Select Python version: pick from discovered interpreters (venv) or available Python versions (conda) Name your environment: enter a custom name or accept the default · Install dependencies: choose to install from requirements.txt, pyproject.toml, or environment.yml · Custom Create lets you configure each step. ... If uv is installed, the extension uses it automatically for venv creation and package installation, which is significantly faster than standard tools.
🌐
Py-pkgs
py-pkgs.org › 02-setup.html
2. System setup — Python Packages
If you’d like to use Docker to ... Code) from the Visual Studio Code website. Once you’ve installed VS Code, you should install the “Python” extension from the VS Code Marketplace....
🌐
DataCamp
datacamp.com › home › tutorials › python › setting up vscode for python: a complete guide
Setting Up VSCode For Python: A Complete Guide | DataCamp
December 3, 2024 - Similarly, our interactive Introduction to Python course helps you master the basics of Python syntax, lists, functions, packages, and Numpy. Installing VSCode is super simple. Download and install the stable build from the official website. The installer is available for all kinds of operating ...
🌐
CodeRivers
coderivers.org › blog › how-to-install-python-packages-in-visual-studio-code
Installing Python Packages in Visual Studio Code — CodeRivers
Python Extension: Open VS Code and install the "Python" extension from the Extensions sidebar. This extension provides essential Python language support. Python has several package managers, with pip and conda being the most established, and uv emerging as a fast modern alternative. pip: The ...
🌐
GUVI
guvi.in › blog › python › install python in vs code 2026: step-by-step for windows, mac & linux
Install Python in Visual Studio Code 2026: Step-by-Step Guide
August 4, 2026 - To install any of these once you Set Up Python in Visual Studio Code, open the Extensions view (Ctrl+Shift+X), search by name, and click Install, the same process for all of them.
🌐
Medium
preettheman.medium.com › how-to-install-python-packages-in-vs-code-e462bbfdaf9c
How To Install Python Packages In VS Code | by Manpreet Singh | Medium
July 21, 2022 - Once this is installed, we can ... want to click on the Terminal button: ... All you have to do now is use a pip command to install a Python package!...
🌐
CodeGenes
codegenes.net › blog › how-to-install-python-packages-in-visual-studio-code
How to Install Python Packages in Visual Studio Code — codegenes.net
You can download it from the official Python website (https://www.python.org/downloads/). Visual Studio Code Installation: Install VS Code from the official website (https://code.visualstudio.com/).
🌐
Hashnode
emminex.hashnode.dev › the tech-thusiast hub › #python › how to install python libraries in visual studio code
How to install Python Libraries in Visual Studio Code
May 29, 2024 - The == part tells pip to install those exact versions. Now, anyone with your requirements.txt file can set up the same environment you’re using just in a few seconds. Visual Studio Code offers various extensions that help manage Python libraries directly from the interface.
🌐
Brainly
brainly.com › computers and technology › high school › how do you install python packages in visual studio code?
[FREE] How do you install Python packages in Visual Studio Code? - brainly.com
November 19, 2023 - Installing Python packages in Visual Studio Code can be done using the integrated terminal with the command 'pip install package_name' or by using the command palette with 'Python: Run Pip Install'.
🌐
Visual Studio Code
code.visualstudio.com › docs › python › python-quick-start
Quick Start Guide for Python in VS Code
November 3, 2021 - You can create a new Python file by selecting New File on the VS Code Welcome page and then selecting Python file, or by navigating to File > New File (). Tip: If you already have a workspace folder open in VS Code, you can add new files or folders directly into your existing project. You can create new folders and files by using the corresponding New Folder or New File icons on the top level folder in the File Explorer view. When you launch VS Code for the very first time, you will need to install the Python extension to get Python-specific features and UI.
🌐
Python GUIs
pythonguis.com › tutorials › getting started with vs code for python
How to Set Up VS Code for Python Development — Complete Beginner's Guide
April 8, 2026 - On Ubuntu/Debian, this can be done by typing sudo apt install python3. Both pip (or pip3) and venv are distributed as separate packages on Ubuntu/Debian and can also be installed by typing sudo apt install python3-pip python3-venv.
🌐
YouTube
youtube.com › the code city
How to Install Python Packages in Visual Studio Code (2023) - YouTube
In this video, I'll show you how you can Install Python Packages in Visual Studio Code:Install PIP: https://youtu.be/ENHnfQ3cBQMInstall Python: https://youtu...
Published: September 5, 2023
Views: 61K
🌐
YouTube
youtube.com › yeo bro!
How To Install & Use/Import Python Packages in Visual Studio Code - YouTube
This is a simple tutorial on how to install Python packages with pip and using the packages in Visual Studio Code. Commands: python -m pip install --upgrade ...
Published: November 11, 2020
Views: 31
🌐
SkillVeris
skillveris.com › home › blog › how to install python and set up vs code (step by step)
How to Install Python and Set Up VS Code (Step by Step) | SkillVeris
May 11, 2026 - To install Python and set up VS Code, download and run the latest stable Python 3 installer for your operating system, install Visual Studio Code, add the Python extension published by Microsoft, then open a project folder and choose your Python ...