skip to Main Content

when i use pip list in vscode i found it in modules lis

requests 2.32.3

once try to use it i get

ModuleNotFoundError: No module named ‘requests’

i tried to install it again using cmd in windows and it installed but got the same error
tried to upgrade it using pip install requests --upgrade

it didn’t work
closed vscode and reopend it and also same error

2

Answers


  1. One suggestion I could give is to use the same virtual environment where you install a requests module.

    Login or Signup to reply.
  2. You can try using the interactive Python shell in your CMD to verify your installation.

    In the same CMD where you executed pip list, run python or python3, and then try the following:

    import requests
    

    If this works without any issues, I’d like to clarify something important:

    The Python environment used when you run code via the "Run" option in the VSCode menu might not be the same as the one used in the VSCode terminal.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search