0

I ran the code import requests in my file and this error come out ModuleNotFoundError: No module named 'requests'

Things I have tried:

  1. installed requests in both windows terminal and vscode terminal that gives the output Requirement already satisfied
  2. ran pip freeze requests==2.25.1 is registered
  3. tried ./pip freeze on the terminal to check if i'm on the wrong terminal as https://stackoverflow.com/a/58160615/15232456 suggests and error: The term './pip' is not recognized
  4. Tried adding the workspace settings path in vscode
{
    "python.pythonPath": "${c:/dev/ala/venv/Scripts/python.exe}/code/venv/bin/python"
}

Perhaps something wrong in this implementation?

Edit: "python.pythonPath" has been replaced by "defaultInterpreterPath"?

so I tried this instead:

{
    "defaultInterpreterPath": "${c:/python36/python.exe}/code/venv/bin/python"
}

Need help, thanks.

Shion IX
  • 1
  • 1

1 Answers1

0

Have you tried installing requests with:

python3 -m pip install requests or

python -m pip install requests or

py -m pip install requests?

  • Yes I have, I run that both on windows terminal and Vscode, and this is the output: ‎‎‎ Requirement already satisfied: requests in c:\users\user\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (2.25.1) ‎‎ there were other lines as well that says pretty much the same thing. – Shion IX Feb 18 '21 at 15:55
  • Do not post comments as answers. – Seelenvirtuose Apr 03 '23 at 15:04