[Pythonmac-SIG] 'import site' failed. Trouble starting python. What does this mean?

Bob Ippolito bob at redivi.com
Wed Jul 20 01:48:21 CEST 2005


On Jul 19, 2005, at 1:33 PM, Louis Pecora wrote:

> Bob Ippolito wrote:
>
>
>> On Jul 19, 2005, at 3:36 AM, Louis Pecora wrote:
>>
>>
>>
>>
>>> I've been having trouble running Python from BBEdit and the  
>>> MacPython
>>> IDE (neither works) so I tried to start from the terminal.  I get  
>>> this
>>> message:
>>>
>>> louispec% python -v
>>> # installing zipimport hook
>>> import zipimport # builtin
>>> # installed zipimport hook
>>> 'import site' failed; traceback:
>>>
>>>
>>>
>>
>> That's no good.  Have you been screwing with environment variables?
>> PYTHONPATH, etc.?
>>
>>
>>
> Yeah, I know I have trouble.  I haven't messed with any variables.   
> The
> whole thing worked fine, then after a trip to a conference where I
> barely used the computer,  Python was dead.
>
> Disk First Aid repaired some of the directory (I think that's what it
> does) involving some Python Frameworks, but then ground to a halt  
> with a
> cryptic message that it couldn't fix whatever it is that broken.
>
> I have ordered DiskWarrior and will try that.  I suspect something is
> broken in the directory.  But then I'm not an expert, maybe it's
> something in Python.
>
>
>> Did the files get deleted from /System/Library/Frameworks/
>> Python.framework/Versions/2.3/lib/python2.3 ?  Or were the
>> permissions mangled?
>>
>>
> Not that I know of, but down in the directory you mention just  
> above I have the following files shown below (sorry for the long  
> list).  I notice that no files with names beginning with a letter  
> past 'p' are there.  I'm not sure what's supposed to be there, but  
> this looks suspicious.
>
> Opinions?
>
> Files in /System/Library ... lib/python2.3:

That list is incomplete, files are missing.  Reinstall Mac OS X or  
upgrade to 10.4.

-bob



More information about the Pythonmac-SIG mailing list