Python 2.7 module path problems on OS X

Discussion in 'Python' started by Nicholas Cole, Sep 5, 2010.

  1. Dear List,

    I have a horrible feeling that this is in some way related to the new
    user installation directory in 2.7,or some problem with the framework
    built, but I'm having great trouble with the module search path on
    2.7.

    I usually install modules to install_lib =
    ~/Library/Python/$py_version_short/site-packages

    I assumed that this would continue to work on 2.7.

    Unfortunately, it seems not to. The installation is fine, but sys.path
    only includes

    '/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip',
    '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7',
    '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin',
    '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac',
    '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
    '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk',
    '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old',
    '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload',
    '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages'

    Whereas on 2.6 on my system the default is the more extensive:

    '/Users/nicholas/Library/Python/2.6/site-packages/docutils-0.5-py2.6.egg',
    '/Users/nicholas/Library/Python/2.6/site-packages/py2app-0.4.3-py2.6.egg',
    '/Users/nicholas/Library/Python/2.6/site-packages/macholib-1.2.1-py2.6.egg',
    '/Users/nicholas/Library/Python/2.6/site-packages/modulegraph-0.7.3-py2.6.egg',
    '/Users/nicholas/Library/Python/2.6/site-packages/altgraph-0.6.7-py2.6.egg',
    '/Users/nicholas/Library/Python/2.6/site-packages/bdist_mpkg-0.4.4-py2.6.egg',
    '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python26.zip',
    '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6',
    '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-darwin',
    '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-mac',
    '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-mac/lib-scriptpackages',
    '/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python',
    '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-tk',
    '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-old',
    '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload',
    '/Library/Python/2.6/site-packages',
    '/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/PyObjC',
    '/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/wx-2.8-mac-unicode',
    '/Users/nicholas/Library/Python/2.6/site-packages'

    I'm sorry to ask such a trivial question on the list, but I'm used to
    python installations "Just working"! Can anyone suggest a good fix?

    Best wishes,

    Nicholas
     
    Nicholas Cole, Sep 5, 2010
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Daniel Ortmann
    Replies:
    4
    Views:
    813
    Skip Montanaro
    Jul 2, 2003
  2. Stephen Ferg

    what is Python's module search path?

    Stephen Ferg, Jan 8, 2004, in forum: Python
    Replies:
    3
    Views:
    741
    Rene Pijlman
    Jan 9, 2004
  3. Gene
    Replies:
    5
    Views:
    419
  4. Ron Adam
    Replies:
    3
    Views:
    599
    Ron Adam
    Aug 2, 2005
  5. Maric Michaud
    Replies:
    0
    Views:
    7,337
    Maric Michaud
    Jun 24, 2006
  6. aznach
    Replies:
    1
    Views:
    298
    Thomas Guettler
    Oct 17, 2006
  7. John Nagle
    Replies:
    4
    Views:
    347
    John Nagle
    Jan 15, 2008
  8. graph
    Replies:
    0
    Views:
    604
    graph
    Sep 26, 2008
Loading...