# "No module named elasticsearch"

**URL:** <https://discuss.elastic.co/t/no-module-named-elasticsearch/16116>\
**Category:** Elasticsearch\
**Created:** [March 3, 2014, 6:37pm UTC](https://discuss.elastic.co/t/no-module-named-elasticsearch/16116 "2014-03-03T18:37:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eric\_Greene](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eric_greene/32/1312_2.png) [@Eric\_Greene](https://discuss.elastic.co/u/Eric_Greene)\
**Post date:** [March 3, 2014, 6:37pm UTC](https://discuss.elastic.co/t/no-module-named-elasticsearch/16116/1 "2014-03-03T18:37:44Z")

</div>

[https://lh3.googleusercontent.com/-EzeBiRu2EhE/UxTLoSk13CI/AAAAAAAAB6I/EKQVNd3zifM/s1600/no-module-elasticsearch.jpg](https://lh3.googleusercontent.com/-EzeBiRu2EhE/UxTLoSk13CI/AAAAAAAAB6I/EKQVNd3zifM/s1600/no-module-elasticsearch.jpg)  
Hi I am getting started using elasticsearch.

I want to try to use the python elasticsearch client[http://elasticsearch-py.readthedocs.org/en/latest/#](http://elasticsearch-py.readthedocs.org/en/latest/#)  
.

I ran pip install elasticsearch. Installation seems successful. But when  
I try to import elasticsearch, I get an error "No module named  
elasticsearch".

What could be the trouble here?

Thanks for any help.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/9a20f2c4-d234-4bfb-8bcd-5e37845e90cb%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/9a20f2c4-d234-4bfb-8bcd-5e37845e90cb%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Honza\_Kral](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/honza_kral/32/876_2.png) [@Honza\_Kral](https://discuss.elastic.co/u/Honza_Kral)\
**Post date:** [March 3, 2014, 6:43pm UTC](https://discuss.elastic.co/t/no-module-named-elasticsearch/16116/2 "2014-03-03T18:43:19Z")

</div>

Hi Eric,

can you please have a look at which python you are using (which python) to  
make sure you are using the system one and not one from virtualenv or  
someplace else.

Also in python please do:  
import sys  
print sys.path

to verify if the directory  
/usr/local/lib/python2.7/dist-packages  
is present there?

Btw I would strongly suggest the use of virtualenv which should make this  
process a lot easier.

Honza

On Mon, Mar 3, 2014 at 7:37 PM, Eric Greene [ericdgreene@gmail.com](mailto:ericdgreene@gmail.com) wrote:

> [https://lh3.googleusercontent.com/-EzeBiRu2EhE/UxTLoSk13CI/AAAAAAAAB6I/EKQVNd3zifM/s1600/no-module-elasticsearch.jpg](https://lh3.googleusercontent.com/-EzeBiRu2EhE/UxTLoSk13CI/AAAAAAAAB6I/EKQVNd3zifM/s1600/no-module-elasticsearch.jpg)  
> Hi I am getting started using elasticsearch.
> 
> I want to try to use the python elasticsearch client[http://elasticsearch-py.readthedocs.org/en/latest/#](http://elasticsearch-py.readthedocs.org/en/latest/#)  
> .
> 
> I ran pip install elasticsearch. Installation seems successful. But when  
> I try to import elasticsearch, I get an error "No module named  
> elasticsearch".
> 
> What could be the trouble here?
> 
> Thanks for any help.
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/9a20f2c4-d234-4bfb-8bcd-5e37845e90cb%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/9a20f2c4-d234-4bfb-8bcd-5e37845e90cb%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/9a20f2c4-d234-4bfb-8bcd-5e37845e90cb%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/9a20f2c4-d234-4bfb-8bcd-5e37845e90cb%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CABfdDipkbM1zV7Z8ui2w21x9Xcom09fhXNcK%2BaFB%2Bxd%3DcW0dCA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CABfdDipkbM1zV7Z8ui2w21x9Xcom09fhXNcK%2BaFB%2Bxd%3DcW0dCA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Eric\_Greene](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eric_greene/32/1312_2.png) [@Eric\_Greene](https://discuss.elastic.co/u/Eric_Greene)\
**Post date:** [March 3, 2014, 7:07pm UTC](https://discuss.elastic.co/t/no-module-named-elasticsearch/16116/3 "2014-03-03T19:07:42Z")

</div>

Hello Honza, it does work in a virtualenv, which is suitable for my  
purposes. Thanks for your help - Eric

On Monday, March 3, 2014 10:37:44 AM UTC-8, Eric Greene wrote:

> [https://lh3.googleusercontent.com/-EzeBiRu2EhE/UxTLoSk13CI/AAAAAAAAB6I/EKQVNd3zifM/s1600/no-module-elasticsearch.jpg](https://lh3.googleusercontent.com/-EzeBiRu2EhE/UxTLoSk13CI/AAAAAAAAB6I/EKQVNd3zifM/s1600/no-module-elasticsearch.jpg)  
> Hi I am getting started using elasticsearch.
> 
> I want to try to use the python elasticsearch client[http://elasticsearch-py.readthedocs.org/en/latest/#](http://elasticsearch-py.readthedocs.org/en/latest/#)  
> .
> 
> I ran pip install elasticsearch. Installation seems successful. But when  
> I try to import elasticsearch, I get an error "No module named  
> elasticsearch".
> 
> What could be the trouble here?
> 
> Thanks for any help.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/6433e343-b5ab-42ca-b560-ad81a0ea2b21%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6433e343-b5ab-42ca-b560-ad81a0ea2b21%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:** [July 6, 2017, 1:46am UTC](https://discuss.elastic.co/t/no-module-named-elasticsearch/16116/4 "2017-07-06T01:46:08Z")

</div>


