initial install problems

9 views
Skip to first unread message

rdmu...@bitdance.com

unread,
May 17, 2007, 9:57:53 PM5/17/07
to pylons-...@googlegroups.com
Sorry for blasting in here without listening for a bit first, but I'm
trying to get started with pylons and am having trouble out of the gate.
I have workingenv installed, and I set up a workingenv for my new pylons
project, then did:

easy_install Pylons

followed by:

paster create --template=pylons helloworld

right from the Getting Started chapter, and what I got was a traceback
ending with:

pkg_resources.DistributionNotFound: PasteScript==1.1

It looks like easy_install successfully installed PasteScript 1.3.4.

So, what did I do wrong? Alternatively, how should I proceed to get
a working Pylons install?

--David

Mike Orr

unread,
May 18, 2007, 2:41:02 AM5/18/07
to pylons-...@googlegroups.com

It certainly looks like stray pieces from an earlier install are
interfering. Did you previously have an older version of Pylons or
any of its dependencies installed? Did you create your workingenv
with --site-packages?

Which file and line does this exception occur at? What is the source
code of the surrounding few lines?

Can you install and run the QuickWiki egg?

--
Mike Orr <slugg...@gmail.com>

rdmu...@bitdance.com

unread,
May 18, 2007, 8:10:10 AM5/18/07
to pylons-...@googlegroups.com
On Thu, 17 May 2007 at 23:41, Mike Orr wrote:
> On 5/17/07, rdmurray@bitdance <rdmu...@bitdance.com> wrote:
>> pkg_resources.DistributionNotFound: PasteScript==1.1
>>
>> It looks like easy_install successfully installed PasteScript 1.3.4.
>>
>> So, what did I do wrong? Alternatively, how should I proceed to get
>> a working Pylons install?
>
> It certainly looks like stray pieces from an earlier install are
> interfering. Did you previously have an older version of Pylons or
> any of its dependencies installed? Did you create your workingenv
> with --site-packages?

I did not install with --site-packages, but I did have an older version
of pylons installed in site-packages at one point. I deleted the pylons
egg itself (and deleted it from .pth), but it's a little hard to know what
else is safe to delete. I wish I'd been using workingenv back then.
But my understanding was that without --site-packages none of that would
matter in a workingenv install...am I wrong? site-packages is not in
my sys.path, nor are there any eggs there that are not from the install
I just did.

> Which file and line does this exception occur at? What is the source
> code of the surrounding few lines?

Here's the full traceback, but I doubt this will be any more
illuminating as it is just setuptools internals:

File "/usr/bin/paster", line 5, in ?
from pkg_resources import load_entry_point
File "/var/www/mysite/lib/python2.4/setuptools-0.6c5-py2.4.egg/pkg_resources.py", line 2482, in ?
for dist in working_set.resolve(
File "/var/www/mysite/lib/python2.4/setuptools-0.6c5-py2.4.egg/pkg_resources.py", line 483, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: PasteScript==1.1

> Can you install and run the QuickWiki egg?

I get the same error when running the paster line:

paster make-config QuickWiki test.ini

after installing the QuickWiki egg.

--David

rdmu...@bitdance.com

unread,
May 18, 2007, 8:46:36 AM5/18/07
to pylons-...@googlegroups.com
On Fri, 18 May 2007 at 08:10, rdmu...@bitdance.com wrote:
> Here's the full traceback, but I doubt this will be any more
> illuminating as it is just setuptools internals:
>
> File "/usr/bin/paster", line 5, in ?

Duh.

Fixed, thanks :)

--David

Mike Orr

unread,
May 18, 2007, 2:21:13 PM5/18/07
to pylons-...@googlegroups.com
On 5/18/07, rdmu...@bitdance.com <rdmu...@bitdance.com> wrote:
> I did not install with --site-packages, but I did have an older version
> of pylons installed in site-packages at one point. I deleted the pylons
> egg itself (and deleted it from .pth), but it's a little hard to know what
> else is safe to delete.

Pylons 0.9.5 depends directly or indirectly on:
Beaker
decorator
FormEncode
Mako
myghtyutils
nose
Paste
PasteDeploy
PasteScript
Routes
simplejson
WebHelpers

An older Pylons would have installed Myghty and Cheetah 1.0 too. I
didn't start using Pylons until 0.9.5 so I don't know what other
dependencies it may have had before then that it doesn't have now.
But any of these packages can be deleted unless you're using them in
non-Pylons applications. You can also delete /usr/bin/nosetests,
/usr/bin/cheetah, /usr/bin/cheetah-compile, and of course
/usr/bin/paster. If you installed docutils you'd have several
/usr/bin/rst2* programs.

I do think setuptools needs an "uninstall" command, perhaps with a
"--dependency-level=1" option to tell it how far deep to delete
indirect dependencies. Otherwise you end up with package soup, can't
tell which script goes with which package, etc.

> I wish I'd been using workingenv back then.

Yeah, workingenv is great.

> But my understanding was that without --site-packages none of that would
> matter in a workingenv install...am I wrong?

No, you're right, but I was trying to figure out how something was
leaking into your environment anyway. You found it with
/usr/bin/paster . That in itself is surprising, however, since
workingenv's "activate" script should put the workingenv's bin
directory before any other bin.

> > Which file and line does this exception occur at? What is the source
> > code of the surrounding few lines?
>
> Here's the full traceback, but I doubt this will be any more
> illuminating as it is just setuptools internals:
>
> File "/usr/bin/paster", line 5, in ?
> from pkg_resources import load_entry_point
> File "/var/www/mysite/lib/python2.4/setuptools-0.6c5-py2.4.egg/pkg_resources.py", line 2482, in ?
> for dist in working_set.resolve(
> File "/var/www/mysite/lib/python2.4/setuptools-0.6c5-py2.4.egg/pkg_resources.py", line 483, in resolve
> raise DistributionNotFound(req) # XXX put more info here
> pkg_resources.DistributionNotFound: PasteScript==1.1

Darn, I expected the source to be a literal
'pkg_resources.require("PasteScript==1.1")', but I guess the
dependency was specified in the egg somehow.

--
Mike Orr <slugg...@gmail.com>

rdmu...@bitdance.com

unread,
May 18, 2007, 2:35:08 PM5/18/07
to pylons-...@googlegroups.com
On Fri, 18 May 2007 at 11:21, Mike Orr wrote:
> But any of these packages can be deleted unless you're using them in
> non-Pylons applications. You can also delete /usr/bin/nosetests,

There's the rub. I'm not sure :)

> No, you're right, but I was trying to figure out how something was
> leaking into your environment anyway. You found it with
> /usr/bin/paster . That in itself is surprising, however, since
> workingenv's "activate" script should put the workingenv's bin
> directory before any other bin.

It does. The problem is that I didn't do a rehash after doing
the easy_install. And since I use long running screen sessions
for all my dev work, it was still un-rehashed when I came back
to the project the next day :)

Thanks again for your help.

--David

Reply all
Reply to author
Forward
0 new messages