OK, solution at bottom.

On Tue, Apr 20, 2010 at 10:24 AM, JohnWShipman <[email protected]> wrote:
> Here's what I did (in bash); answers to Mike Orr's questions below.
>  1. python virtualenv.py --no-site-packages root
>  2. cd root
>  3. source bin/activate
>  4. root/bin/easy_install Pylons
>        This got me version 0.9.6.2.

Yikes, that's old. The book was written for 0.9.7, and the current
version on PyPI is 0.10rc1.  But the steps are still the same for all
these versions.

>  5. paster create --template=Pylons Site

I assume you mean a lowercase 'pylons'. My version of Paster does not
even recognize Pylons with a capital p.

>  6. cd Site
>  7. paster serve development.ini

OK, the problem is the project name 'Site'. You can't create a project
with the same name as a standard Python module.  I have only seen it
with 'Test', but it looks like 'Site' has the same problem.

The problem is that with a name like 'Test', Paster naively creates a
package named 'test'.  Then when "paster serve" imports it, it gets
the stdlib module instead, which of course doesn't contain
"config.middleware".

The name 'Site' has an additional level of confusion because the
virtualenv defines its own 'site.py'.

If the book actually has a project named 'Site', I can forward a bug
to the author.

-- 
Mike Orr <[email protected]>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to