site packages and /System/Library

  • Hi All,

    Given the direction from Apple  at
    <http://developer.apple.com/documentation/MacOSX/Conceptual/
    BPFileSystem/Articles/LibraryDirectory.html
    >
    that
    "The Frameworks directory in the system domain is for Apple-provided
    frameworks only. Developers should install their custom frameworks in
    either the local or user domain."

    What is the correct location for 3rd party site-packages to be used
    with the system python?

    _________________________________________________
    experimental polymedia:    www.avatar.com.au
    Sonic Communications Research Group,
    University of Canberra:     creative.canberra.edu.au/scrg/
  • The same rules should apply, so in the Python directory of the local
    or user domain.

    Christiaan

    On 14 Nov 2007, at 2:16 PM, David Worrall wrote:

    > Hi All,
    >
    > Given the direction from Apple  at
    > <http://developer.apple.com/documentation/MacOSX/Conceptual/
    > BPFileSystem/Articles/LibraryDirectory.html>
    > that
    > "The Frameworks directory in the system domain is for Apple-
    > provided frameworks only. Developers should install their custom
    > frameworks in either the local or user domain."
    >
    > What is the correct location for 3rd party site-packages to be used
    > with the system python?
  • On 14 Nov 2007, at 13:16, David Worrall wrote:
    >
    > What is the correct location for 3rd party site-packages to be used
    > with the system python?

    >>> import sys
    >>> print sys.path
    ['',
    '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
    python25.zip',
    '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
    python2.5',
    '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
    python2.5/plat-darwin',
    '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
    python2.5/plat-mac',
    '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
    python2.5/plat-mac/lib-scriptpackages',
    '/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/
    python',
    '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
    python2.5/lib-tk',
    '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
    python2.5/lib-dynload',
    '/Library/Python/2.5/site-packages',
    '/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/
    python/PyObjC']

    Looks like /Library/Python/2.5/site-packages

    Fairly unsurprising really.
  • Unsurprising? perhaps if you're telepathic:

    >>> import sys
    >>> print sys.path
    ['',
    '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
    python23.zip',
    '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
    python2.3',
    '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
    python2.3/plat-darwin',
    '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
    python2.3/plat-mac',
    '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
    python2.3/plat-mac/lib-scriptpackages',
    '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
    python2.3/lib-tk',
    '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
    python2.3/lib-dynload',
    '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
    python2.3/site-packages',
    '/System/Library/Frameworks/Python.framework/Versions/2.3/Extras/lib/
    python']

    which doesn't include a
    '/Library/Python/2.3/site-packages'

    Following Paul's lead, however
      /Library/Python/2.3/site-packages
    has a lovely little README
    and is in the path
    So why doesn't /Library/Python/2.3/site-packages show up in sys.path?

    Fairly surprising, really.

    On 15/11/2007, at 2:56 AM, Paul Sargent wrote:

    >
    > On 14 Nov 2007, at 13:16, David Worrall wrote:
    >>
    >> What is the correct location for 3rd party site-packages to be
    >> used with the system python?
    >
    >>>> import sys
    >>>> print sys.path
    > ['',
    > '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
    > python25.zip',
    > '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
    > python2.5',
    > '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
    > python2.5/plat-darwin',
    > '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
    > python2.5/plat-mac',
    > '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
    > python2.5/plat-mac/lib-scriptpackages',
    > '/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/
    > lib/python',
    > '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
    > python2.5/lib-tk',
    > '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
    > python2.5/lib-dynload',
    > '/Library/Python/2.5/site-packages',
    > '/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/
    > lib/python/PyObjC']
    >
    > Looks like /Library/Python/2.5/site-packages
    >
    > Fairly unsurprising really.
    >

    _________________________________________________
    experimental polymedia:    www.avatar.com.au
    Sonic Communications Research Group,
    University of Canberra:     creative.canberra.edu.au/scrg/
  • Ok, forgive my glib remark in that post.

    I did my path dump on a 10.5 system, and it looks like you're on 10.4.

    Looks like Apple got it wrong in Tiger, not providing a site-packages
    directory outside of system. This appears to be fixed in Leopard.

    If you have python installed from Macports (which I also have) it
    seems that the site-packages path is (for python 2.4):

    '/opt/local/lib/python2.4/site-packages'

    I expect it's something similar for their 2.5 package, but I don't
    have a need to install it. It'd be nice if they also included the
    Apple one, but I don't know if that's practical.

    On 14 Nov 2007, at 21:16, David Worrall wrote:

    > Unsurprising? perhaps if you're telepathic:
    >
    >>>> import sys
    >>>> print sys.path
    > ['',
    > '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
    > python23.zip',
    > '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
    > python2.3',
    > '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
    > python2.3/plat-darwin',
    > '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
    > python2.3/plat-mac',
    > '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
    > python2.3/plat-mac/lib-scriptpackages',
    > '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
    > python2.3/lib-tk',
    > '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
    > python2.3/lib-dynload',
    > '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
    > python2.3/site-packages',
    > '/System/Library/Frameworks/Python.framework/Versions/2.3/Extras/lib/
    > python']
    >
    > which doesn't include a
    > '/Library/Python/2.3/site-packages'
    >
    > Following Paul's lead, however
    > /Library/Python/2.3/site-packages
    > has a lovely little README
    > and is in the path
    > So why doesn't /Library/Python/2.3/site-packages show up in sys.path?
    >
    > Fairly surprising, really.
    >
    >
    > On 15/11/2007, at 2:56 AM, Paul Sargent wrote:
    >
    >>
    >> On 14 Nov 2007, at 13:16, David Worrall wrote:
    >>>
    >>> What is the correct location for 3rd party site-packages to be
    >>> used with the system python?
    >>
    >>>>> import sys
    >>>>> print sys.path
    >> ['',
    >> '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
    >> python25.zip',
    >> '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
    >> python2.5',
    >> '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
    >> python2.5/plat-darwin',
    >> '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
    >> python2.5/plat-mac',
    >> '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
    >> python2.5/plat-mac/lib-scriptpackages',
    >> '/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/
    >> lib/python',
    >> '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
    >> python2.5/lib-tk',
    >> '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
    >> python2.5/lib-dynload',
    >> '/Library/Python/2.5/site-packages',
    >> '/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/
    >> lib/python/PyObjC']
    >>
    >> Looks like /Library/Python/2.5/site-packages
    >>
    >> Fairly unsurprising really.
    >>
    >
    > _________________________________________________
    > experimental polymedia:    www.avatar.com.au
    > Sonic Communications Research Group,
    > University of Canberra:     creative.canberra.edu.au/scrg/
    >
    >
    > _______________________________________________
    > MacOSX-dev mailing list
    > <MacOSX-dev...>
    > http://www.omnigroup.com/mailman/listinfo/macosx-dev
  • Hi Paul,
    No offense was taken  - I thought it you were joking around ...

    As I pointed out, whilst
    >>>>> import sys
    >>>>> print sys.path
    >> doesn't include a
    >> '/Library/Python/2.3/site-packages'
    >>

    the real question now becomes why doesn't /Library/Python/2.3/site-
    packages show up when it is there and it can be imported from?
    (It works - I tried it)

    >> Following Paul's lead, however
    >> /Library/Python/2.3/site-packages
    >> has a lovely little README
    >> and is in the path
    >> So why doesn't /Library/Python/2.3/site-packages show up in sys.path?

    ciao,

    David

    On 16/11/2007, at 2:11 AM, Paul Sargent wrote:

    > Ok, forgive my glib remark in that post.
    >
    > I did my path dump on a 10.5 system, and it looks like you're on 10.4.
    >
    > Looks like Apple got it wrong in Tiger, not providing a site-
    > packages directory outside of system. This appears to be fixed in
    > Leopard.
    >
    > If you have python installed from Macports (which I also have) it
    > seems that the site-packages path is (for python 2.4):
    >
    > '/opt/local/lib/python2.4/site-packages'
    >
    > I expect it's something similar for their 2.5 package, but I don't
    > have a need to install it. It'd be nice if they also included the
    > Apple one, but I don't know if that's practical.
    >
    > On 14 Nov 2007, at 21:16, David Worrall wrote:
    >
    >> Unsurprising? perhaps if you're telepathic:
    >>
    >>>>> import sys
    >>>>> print sys.path
    >> ['',
    >> '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
    >> python23.zip',
    >> '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
    >> python2.3',
    >> '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
    >> python2.3/plat-darwin',
    >> '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
    >> python2.3/plat-mac',
    >> '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
    >> python2.3/plat-mac/lib-scriptpackages',
    >> '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
    >> python2.3/lib-tk',
    >> '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
    >> python2.3/lib-dynload',
    >> '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
    >> python2.3/site-packages',
    >> '/System/Library/Frameworks/Python.framework/Versions/2.3/Extras/
    >> lib/python']
    >>
    >> which doesn't include a
    >> '/Library/Python/2.3/site-packages'
    >>
    >> Following Paul's lead, however
    >> /Library/Python/2.3/site-packages
    >> has a lovely little README
    >> and is in the path
    >> So why doesn't /Library/Python/2.3/site-packages show up in sys.path?
    >>
    >> Fairly surprising, really.
    >>
    >>
    >> On 15/11/2007, at 2:56 AM, Paul Sargent wrote:
    >>
    >>>
    >>> On 14 Nov 2007, at 13:16, David Worrall wrote:
    >>>>
    >>>> What is the correct location for 3rd party site-packages to be
    >>>> used with the system python?
    >>>
    >>>>>> import sys
    >>>>>> print sys.path
    >>> ['',
    >>> '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
    >>> python25.zip',
    >>> '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
    >>> python2.5',
    >>> '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
    >>> python2.5/plat-darwin',
    >>> '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
    >>> python2.5/plat-mac',
    >>> '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
    >>> python2.5/plat-mac/lib-scriptpackages',
    >>> '/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/
    >>> lib/python',
    >>> '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
    >>> python2.5/lib-tk',
    >>> '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
    >>> python2.5/lib-dynload',
    >>> '/Library/Python/2.5/site-packages',
    >>> '/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/
    >>> lib/python/PyObjC']
    >>>
    >>> Looks like /Library/Python/2.5/site-packages
    >>>
    >>> Fairly unsurprising really.
    >>>
    >>
    >> _________________________________________________
    >> experimental polymedia:    www.avatar.com.au
    >> Sonic Communications Research Group,
    >> University of Canberra:     creative.canberra.edu.au/scrg/
    >>
    >>
    >> _______________________________________________
    >> MacOSX-dev mailing list
    >> <MacOSX-dev...>
    >> http://www.omnigroup.com/mailman/listinfo/macosx-dev
    >

    _________________________________________________
    experimental polymedia:    www.avatar.com.au
    Sonic Communications Research Group,
    University of Canberra:     creative.canberra.edu.au/scrg/
previous month november 2007 next month
MTWTFSS
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    
Go to today