[PYTHON] A note about doing the Pyramid tutorial

I wanted to know a little more about Pyramid and [Tutorial](http://docs.pylonsproject.org/projects/ pyramid / en / latest / quick_tutorial / index.html) I tried. It is a memo of the stumbled part.

Prelude: Quick Project Startup with Scaffolds

I intended to follow the procedure, but I got an error.

% 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

The cause was that something other than pyramid installed in virtualenv was used.

% which pserve
/usr/local/bin/pserve

Once I uninstalled the pyramid that was installed on my system and the virtualenv one was used, the above error no longer occurred. See also

% which pserve
/Users/mkisono/.pyenv/shims/pserve

Recommended Posts

A note about doing the Pyramid tutorial
A note about __call__
A note about subprocess
A note about mprotect (2)
A note about the python version of python virtualenv
A note about the new style base class
A note about TensorFlow Introduction
A note about [python] __debug__
A note about hitting the Facebook API with the Python SDK
[Python] Building a virtual python environment for the pyramid tutorial (summary)
Python: A Note About Classes 1 "Abstract"
Stumble when doing the django 1.7 tutorial
A note about mock (Python mock library)
A note about the functions of the Linux standard library that handles time
About the test
A note on customizing the dict list class
Data analysis in Python: A note about line_profiler
A memorandum about the Python tesseract wrapper library
[Note] About the role of underscore "_" in Python
Note about awk
A note about checking modifiers with Max Plus
Just a note
About the queue
A little addictive information about Cliff, the CLI framework
A memorandum about the warning of the pylint output result
A brief note on the anger caused by scraping
Make a note of the list of basic Pandas usage
DJango Note: From the beginning (using a generic view)
DJango Note: From the beginning (creating a view from a template)
A story about changing the master name of BlueZ
A note of trying a simple MCMC tutorial on PyMC3
Take a closer look at the Kaggle / Titanic tutorial
Python Note: The mystery of assigning a variable to a variable
A memorandum about matplotlib
Note about pointers (Go)
GO Official Tutorial Note 1
A memorandum about Nan.
(Note) I'll do a Django tutorial. Even if I follow the site, it doesn't work.
About the Unfold function
About the service command
About Python Pyramid traversal
About the confusion matrix
Django Girls Tutorial Note
About the Visitor pattern
pyramid tutorial notes (single_file_tasks)
A note on the default behavior of collate_fn in PyTorch
Note 2 for embedding the scripting language in a bash script
A little deeper story about blockchain, ticking the digital world
A memo about the behavior of bowtie2 during multiple hits
[Note] Import of a file in the parent directory in Python
A story about how to deal with the CORS problem