title: dreamhost python3 Django passenger setup import Cookie
body: <p>I am trying to setup django with python3 on dreamhost.</p>
  
  <p>I have setup a virtualenv as documented by them and installed all the pre-requisites. I have gotten runserver working</p>
  
  <p>The problem comes with passenger setup. The error log shows that I am unable to import a module named Cookie, resulting out of further errors.</p>
  
  <p>This is the traceback:</p>
  
  <pre><code>File "/home/user/path/env/lib/python3.4/imp.py", line 171, in load_source
      module = methods.load()
    File "&lt;frozen importlib._bootstrap&gt;", line 1220, in load
    File "&lt;frozen importlib._bootstrap&gt;", line 1200, in _load_unlocked
    File "&lt;frozen importlib._bootstrap&gt;", line 1129, in _exec
    File "&lt;frozen importlib._bootstrap&gt;", line 1471, in exec_module
    File "&lt;frozen importlib._bootstrap&gt;", line 321, in _call_with_frames_removed
    File "passenger_wsgi.py", line 17, in &lt;module&gt;
      from django.core.wsgi import get_wsgi_application
    File "/home/user/path/env/lib/python3.4/site-packages/django/core/wsgi.py", line 2, in &lt;module&gt;
      from django.core.handlers.wsgi import WSGIHandler
    File "/home/user/path/env/lib/python3.4/site-packages/django/core/handlers/wsgi.py", line 11, in &lt;module&gt;
      from django import http
    File "/home/user/path/env/lib/python3.4/site-packages/django/http/__init__.py", line 1, in &lt;module&gt;
      from django.http.cookie import SimpleCookie, parse_cookie
    File "/home/user/path/env/lib/python3.4/site-packages/django/http/cookie.py", line 5, in &lt;module&gt;
      from django.utils.six.moves import http_cookies
    File "/home/user/path/env/lib/python3.4/site-packages/django/utils/six.py", line 90, in __get__
      result = self._resolve()
    File "/home/user/path/env/lib/python3.4/site-packages/django/utils/six.py", line 113, in _resolve
      return _import_module(self.mod)
    File "/home/user/path/env/lib/python3.4/site-packages/django/utils/six.py", line 80, in _import_module
      __import__(name)
    File "/home/user/path/env/lib/python3.4/site-packages/django/http/__init__.py", line 1, in &lt;module&gt;
      from django.http.cookie import SimpleCookie, parse_cookie
  ImportError: cannot import name 'SimpleCookie'
  </code></pre>
  
  <p>as you can see the line, </p>
  
  <pre><code>from django.core.wsgi import get_wsgi_application
  </code></pre>
  
  <p>is failing</p>
  
  <p>on the other hand, when i try it with the python interpreter, it imports correctly.</p>
  
  <p>I have also verified that the same interpreter is being used by passenger  by logging the variable</p>
  
  <pre><code> import sys
   raise Exception(sys.executable)
  </code></pre>
  
  <p>Any ideas as to the cause of this?
  I tried logging path, it displays the following</p>
  
  <pre><code>['/home/user/path/env/lib/python3.4/site-packages', '/home/user/path/env/lib/python3.4/site-packages/django', '/home/user/path/env/bin', '/home/user/path', '/usr/local/dh/passenger/helper-scripts', '/home/user/path/env/lib/python34.zip', '/home/user/path/env/lib/python3.4', '/home/user/path/env/lib/python3.4/plat-linux', '/home/user/path/env/lib/python3.4/lib-dynload', '/home/user/opt/python-3.4.2/lib/python3.4', '/home/user/opt/python-3.4.2/lib/python3.4/plat-linux', '/home/user/path/env/lib/python3.4/site-packages', '/home/user/path', '/home/user/path/git/package']
  </code></pre>
  
  <p>which seems fine to me</p>