[Distutils] Distutils has no module named util, or is it a package problem?

Ian Bicking ianb at colorstudy.com
Thu Nov 10 22:27:49 CET 2005


Phillip J. Eby wrote:
> At 10:15 AM 11/10/2005 -0800, Ben Bangert wrote:
> 
>>I'm getting the following very odd behavior when downloading and
>>installing from subversion for Paste lately. The error makes it tough
>>to know if this is a Paste problem, a local problem (I've had it on
>>two different OSX machines now), or a setuptools problem.
> 
> 
> Check whether there is a distutils/util.py in your 
> /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/ directory.

I realize now what the problem is.  I included this in the setup.py:

import sys, os
sys.path.insert(0, os.path.dirname(__file__))
from paste.util import finddata

This would actually work... except it doesn't work when doing the 
sandbox install, and the exception comes during the sandbox phase.  I'm 
not sure why a sandbox installation is happening (zip_safe is explicitly 
set to False)?  Here's the end of the traceback:

   File 
"/usr/home/ianb/co/setuptools/setuptools/command/easy_install.py", line 
837, in run_setup
     run_setup(setup_script, args)
   File "/usr/home/ianb/co/setuptools/setuptools/sandbox.py", line 27, 
in run_setup
     DirectorySandbox(setup_dir).run(
   File "/usr/home/ianb/co/setuptools/setuptools/sandbox.py", line 64, 
in run
     return func()
   File "/usr/home/ianb/co/setuptools/setuptools/sandbox.py", line 30, 
in <lambda>
     {'__file__':setup_script, '__name__':'__main__'}
   File "/home/ianb/src/py-dist/setup.py", line 12, in ?

ImportError: No module named util



-- 
Ian Bicking  /  ianb at colorstudy.com  /  http://blog.ianbicking.org


More information about the Distutils-SIG mailing list