title: Issue with conda env while using uwsgi
body: <p>I'm trying to run django server with uwsgi using anaconda python on Ubuntu 16.04.6 LTS.
  I've created a conda environment and installed all the dependencies.</p>
  
  <p>If I run the django server in dev(i.e python manage.py runserver), it's working without any issues. But, when I run it with uwsgi, I'm getting "ImportError: cannot import name _remove_dead_weakref stackoverflow"</p>
  
  <p>Error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "wsgi.py", line 11, in &lt;module&gt;
      from django.core.wsgi import get_wsgi_application
    File "/opt/myproj/venvs/api/lib/python2.7/site-packages/django/core/wsgi.py", line 2, in &lt;module&gt;
      from django.core.handlers.wsgi import WSGIHandler
    File "/opt/myproj/venvs/api/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 5, in &lt;module&gt;
      import logging
    File "/opt/myproj/venvs/api/lib/python2.7/logging/__init__.py", line 26, in &lt;module&gt;
      import sys, os, time, cStringIO, traceback, warnings, weakref, collections
    File "/opt/myproj/venvs/api/lib/python2.7/weakref.py", line 13, in &lt;module&gt;
      from _weakref import (
  ImportError: cannot import name _remove_dead_weakref
  unable to load app 0 (mountpoint='') (callable not found or import error)
  </code></pre>
  
  <p>I've set the path to anaconda</p>
  
  <pre><code>$ echo $PATH
  /home/baji/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/baji/anaconda2/bin
  
  $ echo $PYTHONPATH
  /opt/myproj/venvs/api/bin/python
  </code></pre>
  
  <p>The uwsgi command that I'm trying is</p>
  
  <pre><code>$ /opt/myproj/venvs/api/bin/uwsgi -H /opt/myproj/venvs/api/ -i /opt/myproj/api/wsgi.ini
  </code></pre>
  
  <p>This is the wsgi.ini file</p>
  
  <pre><code>[uwsgi]
  module = wsgi:application
  master = true
  processes = 1
  chmod-socket = 666
  socket = /tmp/api.sock
  check-static = ./static
  wsgi-file = wsgi.py
  touch-reload = /tmp/api.txt
  buffer-size = 65535
  post-buffering = 1
  listen = 65535
  vacuum = true
  max-requests = 1000
  stats = 3032
  stats-http = true
  </code></pre>
  
  <p>Any help is greatly appreciated.</p>