title: Apache ImportError: No module named _socket in wsgi deployment on Django
body: <p>I am using WSGI 3.3 for Python 2.7.3 (32bit) for Apache 2.2. I downloaded the wsgi from <a href="http://code.google.com/p/modwsgi/downloads/detail?name=mod_wsgi-win32-ap22py27-3.3.so" rel="nofollow">http://code.google.com/p/modwsgi/downloads/detail?name=mod_wsgi-win32-ap22py27-3.3.so</a> and just renamed it and transferred it to the APACHE modules. </p>
  
  <p>I have been trying to deploy an application but keep on receiving the <code>ImportError: no module named _socket</code>. I have included my wsgi and error logs.</p>
  
  <p>I am not sure as to what I am doing wrong. I thought maybe I could include a PythonPath but am not sure. I can try to provide more information if needed. Thank you in advance.</p>
  
  <p>APACHE CONFIG:</p>
  
  <pre><code>LoadModule wsgi_module modules/mod_wsgi.so
  
  &lt;Directory C:/Users/xxxxd/Documents/cahd&gt;
  AllowOverride None
  Options None
  Order deny,allow
  Allow from all
  &lt;/Directory&gt;
  
  WSGIScriptAlias / C:/Users/xxxxd/Documents/cahd/cahd/django.wsgi
  </code></pre>
  
  <p>WSGI FIle:</p>
  
  <pre><code>import os, sys    
  sys.path.append('C:/Users/xxxxd/Documents)
  sys.path.append('C:/Users/xxxxd/Documents/cahd/')
  os.environ['DJANGO_SETTINGS_MODULE'] = 'cahd.settings'
  import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler()
  </code></pre>
  
  <p>The error was: </p>
  
  <pre><code>[Mon Nov 19 09:44:17 2012] [error] [client 127.0.0.1] Traceback (most recent call last):
  [Mon Nov 19 09:44:17 2012] [error] [client 127.0.0.1] File "C:/Users/xxxxd/Documents/cahd/django.wsgi", line 10, in 
  [Mon Nov 19 09:44:17 2012] [error] [client 127.0.0.1] import django.core.handlers.wsgi
  [Mon Nov 19 09:44:17 2012] [error] [client 127.0.0.1] File "C:\django\Django-1.4.1\django\core\handlers\wsgi.py", line 8, in 
  [Mon Nov 19 09:44:17 2012] [error] [client 127.0.0.1] from django import http
  [Mon Nov 19 09:44:17 2012] [error] [client 127.0.0.1] File "C:\django\Django-1.4.1 \django\http\_init_.py", line 11, in 
  [Mon Nov 19 09:44:17 2012] [error] [client 127.0.0.1] from urllib import urlencode, quote
  [Mon Nov 19 09:44:17 2012] [error] [client 127.0.0.1] File "C:\Python27\Lib\urllib.py", line 26, in 
  [Mon Nov 19 09:44:17 2012] [error] [client 127.0.0.1] import socket
  [Mon Nov 19 09:44:17 2012] [error] [client 127.0.0.1] File "C:\Python27\Lib\socket.py", line 47, in 
  [Mon Nov 19 09:44:17 2012] [error] [client 127.0.0.1] import _socket
  [Mon Nov 19 09:44:17 2012] [error] [client 127.0.0.1] ImportError: No module named _socket
  </code></pre>