How to pip install Python Modules in VSCode


VSCode pip command example

If you have a Python project that you are working on in VS Code and want to import a module using pip, follow the below steps,

  1. Open Terminal,
  2. Create Virtual Environment (.venv),
    Mac/Linux: python3 -m venv .venv
    Windows: py -3 -m venv .venv
  3. Press yes when you see the notice: "We noticed a new virtual environment has been created. Do you want to select it for the workspace folder?"
  4. Now you can install Python modules using pip (pip3) command.

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail: rakesh@code2care.org



















Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap