sys.path in python3.3

Nicholas Cole nicholas.cole at gmail.com
Sun Aug 26 15:57:53 EDT 2012


On Sun, Aug 26, 2012 at 8:21 PM, Ned Deily <nad at acm.org> wrote:
> In article
> <CAAu18hc7katbONp7A+-A1pyE8BYySgfaC4FHHKSD8peeQjLMbg at mail.gmail.com>,
>  Nicholas Cole <nicholas.cole at gmail.com> wrote:
>> In all previous versions of python, I've been able to install packages
>> into the path:
>>
>> ~/Library/Python/$py_version_short/site-packages
>>
>> but in the rc builds of python 3.3 this is no longer part of sys.path.
>>
>> Before I go hacking the install, is there a reason that this path was
>> removed?  Is there a recommended way to get it back, or is this a
>> gentle way of pushing us all to use virtualenv rather than installing
>> user-specific packages?
>
> It should be working if you are using an OS X framework build.  What is
> the value of sys.path?

I'm using the compiled version supplied by python.org.


Python 3.3.0rc1 (v3.3.0rc1:8bb5c7bc46ba, Aug 25 2012, 10:09:29)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/Library/Frameworks/Python.framework/Versions/3.3/lib/python33.zip',
'/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3',
'/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/plat-darwin',
'/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/lib-dynload',
'/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages']
>>>

This contrasts with (for python3.1)

Python 3.1.1 (r311:74543, Aug 24 2009, 18:44:04)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/Library/Frameworks/Python.framework/Versions/3.1/lib/python31.zip',
'/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1',
'/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/plat-darwin',
'/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/lib-dynload',
'/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages',
'/Users/nicholas/Library/Python/3.1/site-packages']


Best wishes,

Nicholas



More information about the Python-list mailing list