我有一个Django
项目gevent-socketio
在开发模式下使用 manage.py runserver_socketio 命令运行良好。但我现在尝试将它部署在 Web 服务器 ( Apache
) 上,但出现此错误:
Traceback:
File "C:\Python27\lib\site-packages\django\core\handlers\base.py" in get_response
92. response = middleware_method(request)
File "C:\Python27\lib\site-packages\django\middleware\common.py" in process_request
69. if (not urlresolvers.is_valid_path(request.path_info, urlconf) and
File "C:\Python27\lib\site-packages\django\core\urlresolvers.py" in is_valid_path
551. resolve(path, urlconf)
File "C:\Python27\lib\site-packages\django\core\urlresolvers.py" in resolve
440. return get_resolver(urlconf).resolve(path)
File "C:\Python27\lib\site-packages\django\core\urlresolvers.py" in resolve
319. for pattern in self.url_patterns:
File "C:\Python27\lib\site-packages\django\core\urlresolvers.py" in url_patterns
347. patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "C:\Python27\lib\site-packages\django\core\urlresolvers.py" in urlconf_module
342. self._urlconf_module = import_module(self.urlconf_name)
File "C:\Python27\lib\site-packages\django\utils\importlib.py" in import_module
35. __import__(name)
File "C:/wamp/www/project\project\urls.py" in <module>
4. import socketio.sdjango
File "C:\Python27\lib\site-packages\gevent_socketio-0.3.6-py2.7.egg\socketio\__init__.py" in <module>
4. import gevent
File "C:\Python27\lib\site-packages\gevent\__init__.py" in <module>
40. from gevent import core
Exception Type: ImportError at /project
Exception Value: cannot import name core
我对 httpd.conf 的补充:
LoadModule wsgi_module modules/mod_wsgi.so
...
Alias /media/ "C:/wamp/www/project/static"
<Directory C:/wamp/www/project>
Order deny,allow
Allow from all
</Directory>
WSGIScriptAlias / "C:/wamp/www/project/mod.wsgi"
mod.wsgi 文件:
import os, sys
sys.path.insert(0,"C:\\wamp\\www\\project")
os.environ['DJANGO_SETTINGS_MODULE'] = 'project.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
版本:
- Django 1.5.2
- Python 2.7.2(32 位)
- 阿帕奇 2.2.22(32 位)
- mod_wsgi-win32-ap22py27-3.3(从这里下载)
- gevent-socketio 0.13.8
- gevent(从这里下载)
阿帕奇错误日志:
[Sun Sep 15 01:20:20 2013] [error] ERROR Internal Server Error: /
[Sun Sep 15 01:20:20 2013] [error] Traceback (most recent call last):
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\core\\handlers\\base.py", line 103, in get_response
[Sun Sep 15 01:20:20 2013] [error] resolver_match = resolver.resolve(request.path_info)
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\core\\urlresolvers.py", line 319, in resolve
[Sun Sep 15 01:20:20 2013] [error] for pattern in self.url_patterns:
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\core\\urlresolvers.py", line 347, in url_patterns
[Sun Sep 15 01:20:20 2013] [error] patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\core\\urlresolvers.py", line 342, in urlconf_module
[Sun Sep 15 01:20:20 2013] [error] self._urlconf_module = import_module(self.urlconf_name)
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\utils\\importlib.py", line 35, in import_module
[Sun Sep 15 01:20:20 2013] [error] __import__(name)
[Sun Sep 15 01:20:20 2013] [error] File "C:\\wamp\\www\\project\\project\\urls.py", line 4, in <module>
[Sun Sep 15 01:20:20 2013] [error] import socketio.sdjango
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\gevent_socketio-0.3.6-py2.7.egg\\socketio\\__init__.py", line 4, in <module>
[Sun Sep 15 01:20:20 2013] [error] import gevent
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\gevent\\__init__.py", line 48, in <module>
[Sun Sep 15 01:20:20 2013] [error] from gevent.greenlet import Greenlet, joinall, killall
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\gevent\\greenlet.py", line 6, in <module>
[Sun Sep 15 01:20:20 2013] [error] from gevent.hub import greenlet, getcurrent, get_hub, GreenletExit, Waiter
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\gevent\\hub.py", line 30, in <module>
[Sun Sep 15 01:20:20 2013] [error] greenlet = __import__('greenlet').greenlet
[Sun Sep 15 01:20:20 2013] [error] ImportError: DLL load failed: Kan opgegeven module niet vinden.
[Sun Sep 15 01:20:20 2013] [error] ERROR Internal Server Error: /
[Sun Sep 15 01:20:20 2013] [error] Traceback (most recent call last):
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\core\\handlers\\base.py", line 103, in get_response
[Sun Sep 15 01:20:20 2013] [error] resolver_match = resolver.resolve(request.path_info)
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\core\\urlresolvers.py", line 319, in resolve
[Sun Sep 15 01:20:20 2013] [error] for pattern in self.url_patterns:
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\core\\urlresolvers.py", line 347, in url_patterns
[Sun Sep 15 01:20:20 2013] [error] patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\core\\urlresolvers.py", line 342, in urlconf_module
[Sun Sep 15 01:20:20 2013] [error] self._urlconf_module = import_module(self.urlconf_name)
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\utils\\importlib.py", line 35, in import_module
[Sun Sep 15 01:20:20 2013] [error] __import__(name)
[Sun Sep 15 01:20:20 2013] [error] File "C:\\wamp\\www\\project\\project\\urls.py", line 4, in <module>
[Sun Sep 15 01:20:20 2013] [error] import socketio.sdjango
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\gevent_socketio-0.3.6-py2.7.egg\\socketio\\__init__.py", line 4, in <module>
[Sun Sep 15 01:20:20 2013] [error] import gevent
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\gevent\\__init__.py", line 48, in <module>
[Sun Sep 15 01:20:20 2013] [error] from gevent.greenlet import Greenlet, joinall, killall
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\gevent\\greenlet.py", line 6, in <module>
[Sun Sep 15 01:20:20 2013] [error] from gevent.hub import greenlet, getcurrent, get_hub, GreenletExit, Waiter
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\gevent\\hub.py", line 30, in <module>
[Sun Sep 15 01:20:20 2013] [error] greenlet = __import__('greenlet').greenlet
[Sun Sep 15 01:20:20 2013] [error] ImportError: DLL load failed: Kan opgegeven module niet vinden.
[Sun Sep 15 01:20:20 2013] [error] ERROR Internal Server Error: /
[Sun Sep 15 01:20:20 2013] [error] Traceback (most recent call last):
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\core\\handlers\\base.py", line 103, in get_response
[Sun Sep 15 01:20:20 2013] [error] resolver_match = resolver.resolve(request.path_info)
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\core\\urlresolvers.py", line 319, in resolve
[Sun Sep 15 01:20:20 2013] [error] for pattern in self.url_patterns:
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\core\\urlresolvers.py", line 347, in url_patterns
[Sun Sep 15 01:20:20 2013] [error] patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\core\\urlresolvers.py", line 342, in urlconf_module
[Sun Sep 15 01:20:20 2013] [error] self._urlconf_module = import_module(self.urlconf_name)
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\utils\\importlib.py", line 35, in import_module
[Sun Sep 15 01:20:20 2013] [error] __import__(name)
[Sun Sep 15 01:20:20 2013] [error] File "C:\\wamp\\www\\project\\project\\urls.py", line 4, in <module>
[Sun Sep 15 01:20:20 2013] [error] import socketio.sdjango
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\gevent_socketio-0.3.6-py2.7.egg\\socketio\\__init__.py", line 4, in <module>
[Sun Sep 15 01:20:20 2013] [error] import gevent
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\gevent\\__init__.py", line 40, in <module>
[Sun Sep 15 01:20:20 2013] [error] from gevent import core
[Sun Sep 15 01:20:20 2013] [error] ImportError: cannot import name core
[Sun Sep 15 01:20:20 2013] [error] ERROR Internal Server Error: /
[Sun Sep 15 01:20:20 2013] [error] Traceback (most recent call last):
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\core\\handlers\\base.py", line 103, in get_response
[Sun Sep 15 01:20:20 2013] [error] resolver_match = resolver.resolve(request.path_info)
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\core\\urlresolvers.py", line 319, in resolve
[Sun Sep 15 01:20:20 2013] [error] for pattern in self.url_patterns:
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\core\\urlresolvers.py", line 347, in url_patterns
[Sun Sep 15 01:20:20 2013] [error] patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\core\\urlresolvers.py", line 342, in urlconf_module
[Sun Sep 15 01:20:20 2013] [error] self._urlconf_module = import_module(self.urlconf_name)
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\utils\\importlib.py", line 35, in import_module
[Sun Sep 15 01:20:20 2013] [error] __import__(name)
[Sun Sep 15 01:20:20 2013] [error] File "C:\\wamp\\www\\project\\project\\urls.py", line 4, in <module>
[Sun Sep 15 01:20:20 2013] [error] import socketio.sdjango
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\gevent_socketio-0.3.6-py2.7.egg\\socketio\\__init__.py", line 4, in <module>
[Sun Sep 15 01:20:20 2013] [error] import gevent
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\gevent\\__init__.py", line 40, in <module>
[Sun Sep 15 01:20:20 2013] [error] from gevent import core
[Sun Sep 15 01:20:20 2013] [error] ImportError: cannot import name core
[Sun Sep 15 01:20:20 2013] [error] ERROR Internal Server Error: /favicon.ico
[Sun Sep 15 01:20:20 2013] [error] Traceback (most recent call last):
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\core\\handlers\\base.py", line 92, in get_response
[Sun Sep 15 01:20:20 2013] [error] response = middleware_method(request)
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\middleware\\common.py", line 69, in process_request
[Sun Sep 15 01:20:20 2013] [error] if (not urlresolvers.is_valid_path(request.path_info, urlconf) and
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\core\\urlresolvers.py", line 551, in is_valid_path
[Sun Sep 15 01:20:20 2013] [error] resolve(path, urlconf)
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\core\\urlresolvers.py", line 440, in resolve
[Sun Sep 15 01:20:20 2013] [error] return get_resolver(urlconf).resolve(path)
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\core\\urlresolvers.py", line 319, in resolve
[Sun Sep 15 01:20:20 2013] [error] for pattern in self.url_patterns:
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\core\\urlresolvers.py", line 347, in url_patterns
[Sun Sep 15 01:20:20 2013] [error] patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\core\\urlresolvers.py", line 342, in urlconf_module
[Sun Sep 15 01:20:20 2013] [error] self._urlconf_module = import_module(self.urlconf_name)
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\utils\\importlib.py", line 35, in import_module
[Sun Sep 15 01:20:20 2013] [error] __import__(name)
[Sun Sep 15 01:20:20 2013] [error] File "C:\\wamp\\www\\project\\project\\urls.py", line 4, in <module>
[Sun Sep 15 01:20:20 2013] [error] import socketio.sdjango
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\gevent_socketio-0.3.6-py2.7.egg\\socketio\\__init__.py", line 4, in <module>
[Sun Sep 15 01:20:20 2013] [error] import gevent
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\gevent\\__init__.py", line 40, in <module>
[Sun Sep 15 01:20:20 2013] [error] from gevent import core
[Sun Sep 15 01:20:20 2013] [error] ImportError: cannot import name core
[Sun Sep 15 01:20:20 2013] [error] ERROR Internal Server Error: /favicon.ico
[Sun Sep 15 01:20:20 2013] [error] Traceback (most recent call last):
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\core\\handlers\\base.py", line 92, in get_response
[Sun Sep 15 01:20:20 2013] [error] response = middleware_method(request)
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\middleware\\common.py", line 69, in process_request
[Sun Sep 15 01:20:20 2013] [error] if (not urlresolvers.is_valid_path(request.path_info, urlconf) and
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\core\\urlresolvers.py", line 551, in is_valid_path
[Sun Sep 15 01:20:20 2013] [error] resolve(path, urlconf)
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\core\\urlresolvers.py", line 440, in resolve
[Sun Sep 15 01:20:20 2013] [error] return get_resolver(urlconf).resolve(path)
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\core\\urlresolvers.py", line 319, in resolve
[Sun Sep 15 01:20:20 2013] [error] for pattern in self.url_patterns:
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\core\\urlresolvers.py", line 347, in url_patterns
[Sun Sep 15 01:20:20 2013] [error] patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\core\\urlresolvers.py", line 342, in urlconf_module
[Sun Sep 15 01:20:20 2013] [error] self._urlconf_module = import_module(self.urlconf_name)
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\utils\\importlib.py", line 35, in import_module
[Sun Sep 15 01:20:20 2013] [error] __import__(name)
[Sun Sep 15 01:20:20 2013] [error] File "C:\\wamp\\www\\project\\project\\urls.py", line 4, in <module>
[Sun Sep 15 01:20:20 2013] [error] import socketio.sdjango
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\gevent_socketio-0.3.6-py2.7.egg\\socketio\\__init__.py", line 4, in <module>
[Sun Sep 15 01:20:20 2013] [error] import gevent
[Sun Sep 15 01:20:20 2013] [error] File "C:\\Python27\\lib\\site-packages\\gevent\\__init__.py", line 40, in <module>
[Sun Sep 15 01:20:20 2013] [error] from gevent import core
[Sun Sep 15 01:20:20 2013] [error] ImportError: cannot import name core
[Sun Sep 15 01:20:21 2013] [error] ERROR Internal Server Error: /favicon.ico
[Sun Sep 15 01:20:21 2013] [error] Traceback (most recent call last):
[Sun Sep 15 01:20:21 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\core\\handlers\\base.py", line 92, in get_response
[Sun Sep 15 01:20:21 2013] [error] response = middleware_method(request)
[Sun Sep 15 01:20:21 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\middleware\\common.py", line 69, in process_request
[Sun Sep 15 01:20:21 2013] [error] if (not urlresolvers.is_valid_path(request.path_info, urlconf) and
[Sun Sep 15 01:20:21 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\core\\urlresolvers.py", line 551, in is_valid_path
[Sun Sep 15 01:20:21 2013] [error] resolve(path, urlconf)
[Sun Sep 15 01:20:21 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\core\\urlresolvers.py", line 440, in resolve
[Sun Sep 15 01:20:21 2013] [error] return get_resolver(urlconf).resolve(path)
[Sun Sep 15 01:20:21 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\core\\urlresolvers.py", line 319, in resolve
[Sun Sep 15 01:20:21 2013] [error] for pattern in self.url_patterns:
[Sun Sep 15 01:20:21 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\core\\urlresolvers.py", line 347, in url_patterns
[Sun Sep 15 01:20:21 2013] [error] patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
[Sun Sep 15 01:20:21 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\core\\urlresolvers.py", line 342, in urlconf_module
[Sun Sep 15 01:20:21 2013] [error] self._urlconf_module = import_module(self.urlconf_name)
[Sun Sep 15 01:20:21 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\utils\\importlib.py", line 35, in import_module
[Sun Sep 15 01:20:21 2013] [error] __import__(name)
[Sun Sep 15 01:20:21 2013] [error] File "C:\\wamp\\www\\project\\project\\urls.py", line 4, in <module>
[Sun Sep 15 01:20:21 2013] [error] import socketio.sdjango
[Sun Sep 15 01:20:21 2013] [error] File "C:\\Python27\\lib\\site-packages\\gevent_socketio-0.3.6-py2.7.egg\\socketio\\__init__.py", line 4, in <module>
[Sun Sep 15 01:20:21 2013] [error] import gevent
[Sun Sep 15 01:20:21 2013] [error] File "C:\\Python27\\lib\\site-packages\\gevent\\__init__.py", line 40, in <module>
[Sun Sep 15 01:20:21 2013] [error] from gevent import core
[Sun Sep 15 01:20:21 2013] [error] ImportError: cannot import name core
[Sun Sep 15 01:20:21 2013] [error] ERROR Internal Server Error: /favicon.ico
[Sun Sep 15 01:20:21 2013] [error] Traceback (most recent call last):
[Sun Sep 15 01:20:21 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\core\\handlers\\base.py", line 92, in get_response
[Sun Sep 15 01:20:21 2013] [error] response = middleware_method(request)
[Sun Sep 15 01:20:21 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\middleware\\common.py", line 69, in process_request
[Sun Sep 15 01:20:21 2013] [error] if (not urlresolvers.is_valid_path(request.path_info, urlconf) and
[Sun Sep 15 01:20:21 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\core\\urlresolvers.py", line 551, in is_valid_path
[Sun Sep 15 01:20:21 2013] [error] resolve(path, urlconf)
[Sun Sep 15 01:20:21 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\core\\urlresolvers.py", line 440, in resolve
[Sun Sep 15 01:20:21 2013] [error] return get_resolver(urlconf).resolve(path)
[Sun Sep 15 01:20:21 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\core\\urlresolvers.py", line 319, in resolve
[Sun Sep 15 01:20:21 2013] [error] for pattern in self.url_patterns:
[Sun Sep 15 01:20:21 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\core\\urlresolvers.py", line 347, in url_patterns
[Sun Sep 15 01:20:21 2013] [error] patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
[Sun Sep 15 01:20:21 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\core\\urlresolvers.py", line 342, in urlconf_module
[Sun Sep 15 01:20:21 2013] [error] self._urlconf_module = import_module(self.urlconf_name)
[Sun Sep 15 01:20:21 2013] [error] File "C:\\Python27\\lib\\site-packages\\django\\utils\\importlib.py", line 35, in import_module
[Sun Sep 15 01:20:21 2013] [error] __import__(name)
[Sun Sep 15 01:20:21 2013] [error] File "C:\\wamp\\www\\project\\project\\urls.py", line 4, in <module>
[Sun Sep 15 01:20:21 2013] [error] import socketio.sdjango
[Sun Sep 15 01:20:21 2013] [error] File "C:\\Python27\\lib\\site-packages\\gevent_socketio-0.3.6-py2.7.egg\\socketio\\__init__.py", line 4, in <module>
[Sun Sep 15 01:20:21 2013] [error] import gevent
[Sun Sep 15 01:20:21 2013] [error] File "C:\\Python27\\lib\\site-packages\\gevent\\__init__.py", line 40, in <module>
[Sun Sep 15 01:20:21 2013] [error] from gevent import core
[Sun Sep 15 01:20:21 2013] [error] ImportError: cannot import name core
Apache
访问日志:
127.0.0.1 - - [15/Sep/2013:01:20:18 +0200] "GET / HTTP/1.1" 500 122971
127.0.0.1 - - [15/Sep/2013:01:20:20 +0200] "GET / HTTP/1.1" 500 96545
127.0.0.1 - - [15/Sep/2013:01:20:20 +0200] "GET /favicon.ico HTTP/1.1" 500 109064
127.0.0.1 - - [15/Sep/2013:01:20:21 +0200] "GET /favicon.ico HTTP/1.1" 500 109064
编辑:
似乎开发人员gevent
在此文件中为库中的问题引入了一个 hacky 解决方案:
https ://bitbucket.org/denis/gevent/src/5a431f359ca55bb610655b64c7495771671d89ba/setup.py?at=default
重要的几行在这里:
# hack: create a symlink from build/../core.so to gevent/core.so
# to prevent "ImportError: cannot import name core" failures
也许问题是没有以某种方式遵循符号链接。但是我检查了我添加了“Options FollowSymLinks”的所有地方,问题仍然存在。