title: redis-py AttributeError: 'module' object has no attribute
body: <p>I installed redis-py on CentOS and Ubuntu. On both I get the same error when trying to access it. </p>
  
  <pre><code>redis-py AttributeError: 'module' object has no attribute
  </code></pre>
  
  <p>If I use the python prompt in the same directory as the source this will work:</p>
  
  <pre><code>&gt;&gt;&gt; import redis
  &gt;&gt;&gt; r = redis.Redis(host='localhost', port=6379, db=0)
  </code></pre>
  
  <p>but if I change directories it will give the error. </p>
  
  <pre><code>&gt;&gt;&gt; import redis
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "redis.py", line 4, in &lt;module&gt;
      print redis.__version__
  AttributeError: 'module' object has no attribute '__version__'
  </code></pre>
  
  <p>Trying with a <code>.py</code> script always gives the error. Any idea what I'm doing wrong, and how to fix it. Probably a newbie Python thing... </p>