# Module not found

**URL:** <https://travis-ci.community/t/module-not-found/12663>\
**Category:** Deployment\
**Created:** [February 8, 2022, 8:48pm UTC](https://travis-ci.community/t/module-not-found/12663 "2022-02-08T20:48:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![HILLBILLYHeisT](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/hillbillyheist/32/7476_2.png) [@HILLBILLYHeisT](https://travis-ci.community/u/HILLBILLYHeisT)\
**Post date:** [February 8, 2022, 8:48pm UTC](https://travis-ci.community/t/module-not-found/12663/1 "2022-02-08T20:48:47Z")

</div>

I’m getting “Module not found” errors for my Travis CI build:

```auto
import requests

url_ddg = "https://api.duckduckgo.com"

def test_ddg0():
    resp = requests.get(url_ddg + "/?q=DuckDuckGo&format=json")
    rsp_data = resp.json()
    assert "DuckDuckGo" in rsp_data["Heading"]

```

My travis.yml file contains this following code:

```auto
language: python
python:
 - "3.8.2"
 - "nightly"
install:
 - "pip install pytest"
 - "pip install -r requirements.txt"
script: python -m pytest Test.py

```

My requirements.txt file contains this:

```auto
pytest==4.6

```

---

<div class="post-metadata">

**Author:** ![Montana](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/montana/32/9566_2.png) [@Montana](https://travis-ci.community/u/Montana)\
**Post date:** [February 8, 2022, 8:50pm UTC](https://travis-ci.community/t/module-not-found/12663/2 "2022-02-08T20:50:49Z")

</div>

I’m thinking that the `requests` module is not apart of your `requirements.txt`? If not, that’s the problem. On occasion `requests` is sometimes installed by default, but not usually in Linux distributions, so add `requests` to your `requirements.txt` so your `requirements.txt` file would look like this:

```bash
pytest==4.6
requests~=2.6.0

```

---

<div class="post-metadata">

**Author:** ![HILLBILLYHeisT](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/hillbillyheist/32/7476_2.png) [@HILLBILLYHeisT](https://travis-ci.community/u/HILLBILLYHeisT)\
**Post date:** [February 10, 2022, 4:46pm UTC](https://travis-ci.community/t/module-not-found/12663/3 "2022-02-10T16:46:01Z")

</div>

this did it @montana, thanks!

---

<div class="post-metadata">

**Author:** ![Montana](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/montana/32/9566_2.png) [@Montana](https://travis-ci.community/u/Montana)\
**Post date:** [February 10, 2022, 5:09pm UTC](https://travis-ci.community/t/module-not-found/12663/4 "2022-02-10T17:09:49Z")

</div>

No problem.
