# No module named 'requests' when it is installed?

**URL:** https://discuss.python.org/t/no-module-named-requests-when-it-is-installed/25631
**Category:** Python Help
**Tags:** help
**Created:** [April 9, 2023, 10:07pm UTC](https://discuss.python.org/t/no-module-named-requests-when-it-is-installed/25631 "2023-04-09T22:07:03Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![AAA](https://avatars.discourse-cdn.com/v4/letter/a/ea666f/32.png) [@AAA](https://discuss.python.org/u/AAA)
#### Post date: [April 9, 2023, 10:07pm UTC](https://discuss.python.org/t/no-module-named-requests-when-it-is-installed/25631/1 "2023-04-09T22:07:03Z")

</div>

I have the module requests installed, but when i run it it tells me it is not.

---

<div class="post-metadata">

### Author: ![cameron](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/cameron/32/2658_2.png) [@cameron](https://discuss.python.org/u/cameron)
#### Post date: [April 10, 2023, 12:39am UTC](https://discuss.python.org/t/no-module-named-requests-when-it-is-installed/25631/2 "2023-04-10T00:39:32Z")

</div>

Can you be more specific? How did you install the `requests` module? How  
are you “running” it? What output do you get?

Please copy/paste output text between code fences in your reply, eg:

````
 ```
 your output text
 goes here
 ```

````

There’s a `</>` button in the compose menu to make such a section.

The usual reason for this is that you have installed the `requests`  
module in a diferent Python that the Python you’reusing to “run” it.

Cheers,  
Cameron Simpson [cs@cskk.id.au](mailto:cs@cskk.id.au)

---

<div class="post-metadata">

### Author: ![AAA](https://avatars.discourse-cdn.com/v4/letter/a/ea666f/32.png) [@AAA](https://discuss.python.org/u/AAA)
#### Post date: [April 10, 2023, 11:34pm UTC](https://discuss.python.org/t/no-module-named-requests-when-it-is-installed/25631/3 "2023-04-10T23:34:25Z")

</div>

![Screenshot 2023-04-09 163041](https://us1.discourse-cdn.com/flex002/uploads/python1/original/2X/c/c1b6e9243db2645a4edef0216f37627d3e5bb5b8.png)

---

<div class="post-metadata">

### Author: ![AAA](https://avatars.discourse-cdn.com/v4/letter/a/ea666f/32.png) [@AAA](https://discuss.python.org/u/AAA)
#### Post date: [April 10, 2023, 11:35pm UTC](https://discuss.python.org/t/no-module-named-requests-when-it-is-installed/25631/4 "2023-04-10T23:35:01Z")

</div>

I mean starting the script.

---

<div class="post-metadata">

### Author: ![cameron](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/cameron/32/2658_2.png) [@cameron](https://discuss.python.org/u/cameron)
#### Post date: [April 11, 2023, 12:23am UTC](https://discuss.python.org/t/no-module-named-requests-when-it-is-installed/25631/5 "2023-04-11T00:23:27Z")

</div>

Please copy/paste the complete _text_, not a screenshot. Screenshots  
cannot be copy/pasted as text and are a problem for people using the  
email interface and the visually impaired.

We like the entire traceback and the command which was issued to cause  
it.

I notice there’s a `.vscode` in you file path. Are you using VSCode?

Maybe the `requests` package has not been installing in the Python which  
VSCode is using. I believe it has a menu to select a Python interpreter  
and might have one for installing packagings into whichever interpreter  
you’re using.

Cheers,  
Cameron Simpson [cs@cskk.id.au](mailto:cs@cskk.id.au)

---

<div class="post-metadata">

### Author: ![hauntsaninja](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/hauntsaninja/32/12451_2.png) [@hauntsaninja](https://discuss.python.org/u/hauntsaninja)
#### Post date: [April 11, 2023, 12:42am UTC](https://discuss.python.org/t/no-module-named-requests-when-it-is-installed/25631/6 "2023-04-11T00:42:11Z")

</div>

If you’re running a script by running `python script.py`, try running `python -m pip install requests` to install it in that python environment

---

<div class="post-metadata">

### Author: ![davidism](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/davidism/32/3295_2.png) [@davidism](https://discuss.python.org/u/davidism)
#### Post date: [March 12, 2024, 1:11am UTC](https://discuss.python.org/t/no-module-named-requests-when-it-is-installed/25631/8 "2024-03-12T01:11:27Z")

</div>


