我最近将金字塔从我的机器上的1.2升级到1.5.1,当尝试启动uwsgi服务器时,现在我收到此错误。
File "/usr/local/lib/python2.7/dist-packages/PasteDeploy-1.5.0-py2.7.egg/paste/deploy/loadwsgi.py", line 247, in loadapp
return loadobj(APP, uri, name=name, **kw)
File "/usr/local/lib/python2.7/dist-packages/PasteDeploy-1.5.0-py2.7.egg/paste/deploy/loadwsgi.py", line 271, in loadobj
global_conf=global_conf)
File "/usr/local/lib/python2.7/dist-packages/PasteDeploy-1.5.0-py2.7.egg/paste/deploy/loadwsgi.py", line 296, in loadcontext
global_conf=global_conf)
File "/usr/local/lib/python2.7/dist-packages/PasteDeploy-1.5.0-py2.7.egg/paste/deploy/loadwsgi.py", line 320, in _loadconfig
return loader.get_context(object_type, name, global_conf)
File "/usr/local/lib/python2.7/dist-packages/PasteDeploy-1.5.0-py2.7.egg/paste/deploy/loadwsgi.py", line 450, in get_context
global_additions=global_additions)
File "/usr/local/lib/python2.7/dist-packages/PasteDeploy-1.5.0-py2.7.egg/paste/deploy/loadwsgi.py", line 559, in _pipeline_app_context
APP, pipeline[-1], global_conf)
File "/usr/local/lib/python2.7/dist-packages/PasteDeploy-1.5.0-py2.7.egg/paste/deploy/loadwsgi.py", line 454, in get_context
section)
File "/usr/local/lib/python2.7/dist-packages/PasteDeploy-1.5.0-py2.7.egg/paste/deploy/loadwsgi.py", line 476, in _context_from_use
object_type, name=use, global_conf=global_conf)
File "/usr/local/lib/python2.7/dist-packages/PasteDeploy-1.5.0-py2.7.egg/paste/deploy/loadwsgi.py", line 406, in get_context
global_conf=global_conf)
File "/usr/local/lib/python2.7/dist-packages/PasteDeploy-1.5.0-py2.7.egg/paste/deploy/loadwsgi.py", line 296, in loadcontext
global_conf=global_conf)
File "/usr/local/lib/python2.7/dist-packages/PasteDeploy-1.5.0-py2.7.egg/paste/deploy/loadwsgi.py", line 328, in _loadegg
return loader.get_context(object_type, name, global_conf)
File "/usr/local/lib/python2.7/dist-packages/PasteDeploy-1.5.0-py2.7.egg/paste/deploy/loadwsgi.py", line 620, in get_context
object_type, name=name)
File "/usr/local/lib/python2.7/dist-packages/PasteDeploy-1.5.0-py2.7.egg/paste/deploy/loadwsgi.py", line 646, in find_egg_entry_point
possible.append((entry.load(), protocol, entry.name))
File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 2190, in load
File "./xyz/__init__.py", line 1, in <module>
from pyramid.config import Configurator
File "/usr/local/lib/python2.7/dist-packages/pyramid/config/__init__.py", line 20, in <module>
from pyramid.authorization import ACLAuthorizationPolicy
File "/usr/local/lib/python2.7/dist-packages/pyramid/authorization.py", line 9, in <module>
from pyramid.security import (
File "/usr/local/lib/python2.7/dist-packages/pyramid/security.py", line 13, in <module>
from pyramid.threadlocal import get_current_registry
File "/usr/local/lib/python2.7/dist-packages/pyramid/threadlocal.py", line 3, in <module>
from pyramid.registry import global_registry
File "/usr/local/lib/python2.7/dist-packages/pyramid/registry.py", line 5, in <module>
from zope.interface.registry import Components
ImportError: No module named registry
我如何继续解决此错误,我正在使用uwsgi来运行server.I在类似问题中寻找解决方案,但没有任何帮助。
答案 0 :(得分:2)
您还需要升级zope.interface
版本。您需要安装3.8.0或更高版本。
自1.2以来,其他最低要求也已更新:
WebOb
必须为1.3.1或更新repoze.lru
必须为0.4或更高zope.deprecation
需要3.5.0或更新版venusian
现在必须至少是版本1.0a3 translationstring
必须为0.4
或更新。考虑到这些包中的每一个也可能具有其他依赖性。
如果您使用的是buildout,请确保您拥有[versions]
部分并固定更新的版本。如果您有virtualenv,则应调查bin/pip -U
是否能为您提供正确的版本。
但是,我不会在一步中直接从1.2跳到1.5.1。按照upgrade advice,阅读更改日志,看看您是否可以一次升级一个版本的应用程序;控制步骤从1.2到1.3.4到1.4.5到1.5.1。