# No module named 'elasticsearch'

**URL:** <https://discuss.elastic.co/t/no-module-named-elasticsearch/110185>\
**Category:** Elasticsearch\
**Created:** [December 4, 2017, 5:11pm UTC](https://discuss.elastic.co/t/no-module-named-elasticsearch/110185 "2017-12-04T17:11:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lengthy\_preamble](https://avatars.discourse-cdn.com/v4/letter/l/e47774/32.png) [@lengthy\_preamble](https://discuss.elastic.co/u/lengthy_preamble)\
**Post date:** [December 4, 2017, 5:11pm UTC](https://discuss.elastic.co/t/no-module-named-elasticsearch/110185/1 "2017-12-04T17:11:08Z")

</div>

Hello all,

I'm working with a cohort's python script, which calls on the elasticsearch module. However, when I run it in Jupyter, I get the following error:

> * * *
> 
> ImportError Traceback (most recent call last)  
> in ()  
> 2 for i in range(0,6):  
> 3 print('working on page: %d' %(i+1))  
> ----\> 4 ingester(url\_base+str(i\*50))  
> 5
> 
> in ingester(string)  
> 5 import re  
> 6 import time  
> ----\> 7 from elasticsearch import Elasticsearch  
> 8 es = Elasticsearch()  
> 9 #start session s
> 
> ImportError: No module named 'elasticsearch'

I'm using python 3.6 and jupyter is using the python 3 kernel. I've already installed the elasticsearch module by typing "sudo pip install elasticsearch" at the command line (this is on Ubuntu) and even did a restart just to be on the safe side.

If it helps, the entirety of the code is at:

> **[indeed - Pastebin.com](https://pastebin.com/g9MVQ5Dm)**
>
> Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

(the login info has obviously been changed)

Any suggestions would be appreciated.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 1, 2018, 5:11pm UTC](https://discuss.elastic.co/t/no-module-named-elasticsearch/110185/2 "2018-01-01T17:11:14Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
