How to use pip install requests in VS Code?

Open VS Code and launch the terminal (Terminal > New Terminal). Type pip install requests and press Enter. Make sure the correct Python environment is selected. You can verify by running python --version or checking the interpreter in the bottom-left corner of VS Code.
 
To use pip install requests in VS Code, follow these steps:
  1. Open VS Code.
  2. Open Terminal:
    • Press Ctrl + ` or go to View > Terminal.
  3. Activate your Python environment (if needed).
  4. Type and run:
  5. Wait for installation to complete. Now you can use import requests in your code.

Make sure Python and pip are properly installed.
 
Back
Top