Pyramid ImportError: No module named registry
Question: I have recently upgraded pyramid to 1.5.1 from 1.2 on my machine, when try to
start the uwsgi server, now i am getting this error.

    
    
      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
    

How do i proceed to solve this error, I am using uwsgi to run server.I looked
for solutions in the similar questions, but nothing helped me.


Answer: You'll need to upgrade your `zope.interface` version too. You'll need to
install version 3.8.0 or newer.

Other minimal requirements have also updated since 1.2:

  * `WebOb` must be 1.3.1 or newer
  * `repoze.lru` must be 0.4 or up
  * `zope.deprecation` 3.5.0 or newer is required
  * `venusian` must now be version 1.0a3 at least
  * `translationstring` must be `0.4` or newer.

Take into account that each of these packages may have other dependencies too.

If you are using a buildout, make sure you have a `[versions]` section and pin
newer versions. If you have a virtualenv, you should investigate if `bin/pip
-U` will get you the correct versions.

However, I'd not make the jump straight from 1.2 to 1.5.1 in just one step.
Follow the [upgrade
advice](http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/upgrading.html),
read the change log and see if you can upgrade your application one version at
a time; from 1.2 to 1.3.4 to 1.4.5 to 1.5.1 in controlled steps.

