Ich wollte etwas mehr über Pyramid und Tutorial wissen. pyramid / de / latest / quick_tutorial / index.html) Ich habe es versucht. Es ist ein Memo des gestolperten Teils.
Prelude: Quick Project Startup with Scaffolds
Ich wollte das Verfahren befolgen, habe aber einen Fehler erhalten.
% pserve development.ini --reload
Starting subprocess with file monitor
Traceback (most recent call last):
File "/usr/local/bin/pserve", line 9, in <module>
load_entry_point('pyramid', 'console_scripts', 'pserve')()
File "/usr/local/lib/python2.7/site-packages/pyramid/scripts/pserve.py", line 60, in main
return command.run()
File "/usr/local/lib/python2.7/site-packages/pyramid/scripts/pserve.py", line 371, in run
global_conf=vars)
File "/usr/local/lib/python2.7/site-packages/pyramid/scripts/pserve.py", line 406, in loadapp
return loadapp(app_spec, name=name, relative_to=relative_to, **kw)
File "/usr/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
return loadobj(APP, uri, name=name, **kw)
File "/usr/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 271, in loadobj
global_conf=global_conf)
File "/usr/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 296, in loadcontext
global_conf=global_conf)
File "/usr/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 320, in _loadconfig
return loader.get_context(object_type, name, global_conf)
File "/usr/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 454, in get_context
section)
File "/usr/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 476, in _context_from_use
object_type, name=use, global_conf=global_conf)
File "/usr/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 406, in get_context
global_conf=global_conf)
File "/usr/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 296, in loadcontext
global_conf=global_conf)
File "/usr/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 328, in _loadegg
return loader.get_context(object_type, name, global_conf)
File "/usr/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 620, in get_context
object_type, name=name)
File "/usr/local/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 640, in find_egg_entry_point
pkg_resources.require(self.spec)
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 968, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 854, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'scaffolds' distribution was not found and is required by the application
Die Ursache war, dass etwas anderes als die in virtualenv installierte Pyramide verwendet wurde.
% which pserve
/usr/local/bin/pserve
Nachdem ich die auf meinem System installierte Pyramide deinstalliert und die virtuelle verwendet hatte, trat der obige Fehler nicht mehr auf. Siehe auch
% which pserve
/Users/mkisono/.pyenv/shims/pserve
Recommended Posts