[Distutils] Paste broken? (likely setuptools installation problem)

Ben Bangert ben at groovie.org
Fri Mar 3 22:56:54 CET 2006


On Mar 3, 2006, at 1:27 PM, Robert Leftwich wrote:

> In an attempt to solve this problem and get Pylons working again  
> I've spent the
> last 2hrs trying various approaches - ending up with deleting  
> everything even
> remotely connected to my app and Pylons from the site-packages,  
> cleaning up
> easy-install.pth to remove all references, deleting all eggs -  
> basically
> everything I could find, even to the point of blowing away ez- 
> setup.py.

I'm trying to reproduce this problem, clearing Paste and running  
easy_install appears to fetch it all properly. I've done this on  
several different machines (FreeBSD 4.2, FreeBSD 5.2, OSX 10.4), I  
can't seem to reproduce it anywhere.

I'm cc'ing dist-utils on this as it appears to be an issue with  
setuptools.

> Running python ez_setup.py Pylons==dev results in:
>
> ... (some successful installs elided)
>
> Installed /usr/lib/python2.4/site-packages/PasteScript-0.5dev_r4816- 
> py2.4.egg
> Searching for PasteDeploy==dev,>=0.5dev-r4624
> Reading http://www.python.org/pypi/PasteDeploy/
> Reading http://pythonpaste.org/deploy/
> Best match: PasteDeploy dev
> Downloading http://svn.pythonpaste.org/Paste/Deploy/ 
> trunk#egg=PasteDeploy-dev
> Doing subversion checkout from http://svn.pythonpaste.org/Paste/ 
> Deploy/trunk to
> /tmp/easy_install-9WT2is/trunk
> Processing trunk
> Running setup.py -q bdist_egg --dist-dir
> /tmp/easy_install-9WT2is/trunk/egg-dist-tmp-s4UzvR
> warning: manifest_maker: standard file not found: should have one  
> of README,
> README.txt
> warning: no files found matching 'docs/*.html'
> warning: no previously-included files found matching 'docs/rebuild'
> ---------------------------------------------------------------------- 
> ---
> CONFLICT WARNING:
>
> The following modules or packages have the same names as modules or
> packages being installed, and will be *before* the installed  
> packages in
> Python's search path.  You MUST remove all of the relevant files and
> directories before you will be able to use the package(s) you are
> installing:
>
>     /usr/lib/python2.4/site-packages/PasteScript-0.5dev_r4816- 
> py2.4.egg/paste
>
> Note: you can attempt this installation again with EasyInstall, and  
> use
> either the --delete-conflicting (-D) option or the
> --ignore-conflicts-at-my-risk option, to either delete the above files
> and directories, or to ignore the conflicts, respectively.  Note  
> that if
> you ignore the conflicts, the installed package(s) may not work.
> Running with -D succeeds (sort of), except that doing a "paster create
> --template=pylons test" fails with:
>
>
> Traceback (most recent call last):
>    File "/usr/bin/paster", line 5, in ?
>      pkg_resources.run_script('PasteScript==0.5dev-r4816', 'paster')
>    File
> "/usr/lib/python2.4/site-packages/setuptools-0.6a11dev_r42684- 
> py2.4.egg/pkg_resources.py",
> line 407, in run_script
>      self.require(requires)[0].run_script(script_name, ns)
>    File
> "/usr/lib/python2.4/site-packages/setuptools-0.6a11dev_r42684- 
> py2.4.egg/pkg_resources.py",
> line 1043, in run_script
>      execfile(script_filename, namespace, namespace)
>    File
> "/usr/lib/python2.4/site-packages/PasteScript-0.5dev_r4816- 
> py2.4.egg/EGG-INFO/scripts/paster",
> line 17, in ?
>      from paste.script import command
> ImportError: No module named script
>
> I've tried all the combinations I can think of (using setuptools  
> a10 and dev as
> shown above), easy_install and ez_setup.py, even installing the  
> Paste* dev
> releases directly using easy_install, but all w/o success.
>
> Can anyone offer any alternative approaches to getting Pylons to  
> work again?

Ok, I'm not sure how this is happening but my guess is that for some  
bizarre reason PasteScript was seen as a conflict to PasteDeploy.  
When you ran with -D, it of course happily blew away PasteScript  
during the PasteDeploy installation. So of course, when paster tries  
to use something from PasteScript, there is no longer any PasteScript  
registered as being around anymore thus it can't be imported.

Perhaps try installing just PasteScript:
easy_install -U PasteScript==dev

Then run paster again? Alternatively, if something is borked in your  
setuptools settings somewhere, which cause PasteDeploy to think  
PasteScript was in conflict... hopefully one of the distutils guys  
can think of either a reason that would happen, or how you could  
prevent it from occuring.

Hope that helps,
Ben


More information about the Distutils-SIG mailing list