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
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>
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
Duh.
Fixed, thanks :)
--David
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>
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