Python Elasticsearch urllib3 exception
<p>I have to use python-elasticsearch library on a machine where I could only execute programs.  I am trying to use elasticsearch module by appending sys.path as mentioned below. I am facing below issue. It looks like the problem related to what is mentioned here 
<a href="https://github.com/elastic/elasticsearch-py/issues/253" rel="nofollow">https://github.com/elastic/elasticsearch-py/issues/253</a> . But how do I resolve this when I dont have sudo access or any sort of upgrade access.</p>

<p>**Note :**I don't have sudo access on this machine so I cannot have venv, pip etc.</p>

<pre><code>    import sys
    sys.path.append('/tmp/elasticpy/elasticsearch-2.3.0')
    from elasticsearch import Elasticsearch
    Traceback (most recent call last):
      File "&lt;stdin&gt;", line 1, in &lt;module&gt;
      File "/tmp/elasticpy/elasticsearch-2.3.0/elasticsearch/__init__.py", line 17, in &lt;module&gt;
        from .client import Elasticsearch
      File "/tmp/elasticpy/elasticsearch-2.3.0/elasticsearch/client/__init__.py", line 5, in &lt;module&gt;
        from ..transport import Transport
      File "/tmp/elasticpy/elasticsearch-2.3.0/elasticsearch/transport.py", line 4, in &lt;module&gt;
        from .connection import Urllib3HttpConnection
      File "/tmp/elasticpy/elasticsearch-2.3.0/elasticsearch/connection/__init__.py", line 3, in &lt;module&gt;
        from .http_urllib3 import Urllib3HttpConnection
      File "/tmp/elasticpy/elasticsearch-2.3.0/elasticsearch/connection/http_urllib3.py", line 2, in &lt;module&gt;
        import urllib3
    ImportError: No module named urllib3
</code></pre>

<p>@nehal Thanks for your suggestion I was able to get it fixed. Please find the 
series of steps  I used to install</p>

<ol>
<li>Used easy_install to install package pip</li>
<li>Appended PYTHONPATH</li>
<li>used pip to install virtualenv</li>
<li>Activated new virtualenv</li>
<li><p>Installed elasticsearch using pip</p>

<pre><code>export PYTHONPATH="${PYTHONPATH}:/tmp/pytest/"
easy_install  --install-dir /tmp/pytest/  pip       
pip install virtualenv --prefix /tmp/pytest/
export PATH="${PATH}:/tmp/pytest:/tmp/pytest/bin"
export PYTHONPATH="${PYTHONPATH}:/tmp/pytest/lib/python2.7/site-packages"
cd /tmp/
virtualenv venv
source venv/bin/activate
pip install elasticsearch
</code></pre></li>
</ol>

python python-2.7 elasticsearch urllib3