[Pythonmac-SIG] simple help?

Bob Ippolito bob at redivi.com
Thu Mar 9 01:33:00 CET 2006


On Mar 8, 2006, at 4:28 PM, Samuel M. Smith wrote:

>>>>
>>>> The time machine strikes again :-). You can also install your own
>>>> packages in ~/Library/Python/2.4/site-packages. That directory is
>>>> a proper site-package, .pth files work in there.
>>>>
>>>> [...]
>>>
>>> Well I missed that one. Why doesn't ~/Library/Python/2.4/site-
>>> packages show up in sys.path?
>>> In what order is it searched relative to sys.path?
>>
>> It should be just after the system-wide site packages directory. It
>> is added in site.py
>> when 'Python.framework' is in sys.prefix, and the environment
>> variable HOME is set.
>>
>
> Since my sys.path did not have /Users/smithsm/Library/Python/2.4/site-
> packages
>
> I checked
>   echo $HOME
> /Users/smithsm
>
>>> sys.prefix
> '/Library/Frameworks/Python.framework/Versions/2.4'
>
> Then I checked ~/library/python and there was no  /2.4/site-packages
> So I created /Users/smithsm/Library/Python/2.4/site-packages
>   and then re ran python and this time it was in sys.path at the very
> end.
>
> So does the new Python Installer create ~/Library/Python/2.4/site-
> packages? Or must one create it manually?

One must create it manually.

-bob



More information about the Pythonmac-SIG mailing list