Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Python 2.7 module path problems on OS X

Reply
Thread Tools

Python 2.7 module path problems on OS X

 
 
Nicholas Cole
Guest
Posts: n/a
 
      09-05-2010
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem: Python search path - module order aznach Python 1 10-17-2006 02:44 PM
Re: module docstring, documentation,anything? please note is the module type/object NOT some module Maric Michaud Python 0 06-24-2006 12:42 PM
Path as a dictionary tree key? (was Re: PEP on path module forstandard library) Ron Adam Python 3 08-02-2005 04:27 AM
path to python file given module Gene Python 5 01-10-2005 01:21 AM
what is Python's module search path? Stephen Ferg Python 3 01-09-2004 07:11 AM



Advertisments