[Distutils] newbie bootstrap question

David Kim dkdropbox at gmail.com
Fri Jun 26 17:04:56 CEST 2009


Thanks Jim, I think you are correct. The result of the script you provided
returned 'None'. Unfortunately, I commented out the "try" code...

> #try:

#    import pkg_resources

#except ImportError:


and left the "except" code...

ez = {}

exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'

                         ).read() in ez

ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)


> import pkg_resources


...but got the same error.

I am running the OS X EPD distribution, which uses Enstaller (built on
setuptools). Could this have something to do with it?

Many thanks for the help,

DK


On Fri, Jun 26, 2009 at 5:23 AM, Jim Fulton <jim at zope.com> wrote:

>
> On Jun 25, 2009, at 7:20 PM, David Kim wrote:
>
>  Sorry to ask, but I'm having with the first step of the buildout process,
>> the bootstrap.py script. I get the following error:
>>
>> Traceback (most recent call last):   File "bootstrap.py", line 76, in
>> <module>     ws.find(pkg_resources.Requirement.parse('setuptools')).location
>> AttributeError: 'NoneType' object has no attribute 'location'
>>
>> Unfortunately, I have no idea why this error is occurring. I am running on
>> OS X Leopard and was just trying to bootstrap an empty buildout.cfg file to
>> get things started. Tried googling the error, but nothing came up.
>>
>> Any pointers?
>>
>
>
> My guess is that you have setuptools installed in your python that wasn't
> installed as an egg.   What is the output of running the following Python
> script:
>
>  import pkg_resources
>  ws  = pkg_resources.working_set
>  print ws.find(pkg_resources.Requirement.parse('setuptools'))
>
> ?
>
> The bootstrap script has a try/except that tries to import pkg_utils.  If
> the import succeeds, it assumes that setiuptools is already installed.  Try
> replacing the try/except with the contents of the except.
>
> Jim
>
> --
> Jim Fulton
> Zope Corporation
>
>
>


-- 
morenotestoself.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20090626/f3e06277/attachment.htm>


More information about the Distutils-SIG mailing list