Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #27941 > unrolled thread

sys.path in python3.3

Started byNicholas Cole <nicholas.cole@gmail.com>
First post2012-08-26 19:47 +0100
Last post2012-08-27 10:29 +0100
Articles 4 — 3 participants

Back to article view | Back to comp.lang.python


Contents

  sys.path in python3.3 Nicholas Cole <nicholas.cole@gmail.com> - 2012-08-26 19:47 +0100
    Re: sys.path in python3.3 Hans Mulder <hansmu@xs4all.nl> - 2012-08-27 10:39 +0200
      Re: sys.path in python3.3 Ned Deily <nad@acm.org> - 2012-08-27 02:05 -0700
      Re: sys.path in python3.3 Nicholas Cole <nicholas.cole@gmail.com> - 2012-08-27 10:29 +0100

#27941 — sys.path in python3.3

FromNicholas Cole <nicholas.cole@gmail.com>
Date2012-08-26 19:47 +0100
Subjectsys.path in python3.3
Message-ID<mailman.3849.1346006856.4697.python-list@python.org>
Dear List,

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?

Best wishes,

Nicholas

[toc] | [next] | [standalone]


#27965

FromHans Mulder <hansmu@xs4all.nl>
Date2012-08-27 10:39 +0200
Message-ID<503b3247$0$6877$e4fe514c@news2.news.xs4all.nl>
In reply to#27941
On 26/08/12 20:47:34, Nicholas Cole wrote:
> Dear List,
> 
> 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.

It has been changed to

~/Library/Python/$py_version_short/lib/python/site-packages

You can find the path it's looking for in site.USER_SITE

> 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?

I don't know why it was changed.

It would be nice if there were some magic code you could use
for "install_lib" in your .pydistutils.cfg file that worked
in both 3.2 and 3.3.

-- HansM

[toc] | [prev] | [next] | [standalone]


#27967

FromNed Deily <nad@acm.org>
Date2012-08-27 02:05 -0700
Message-ID<mailman.3863.1346058357.4697.python-list@python.org>
In reply to#27965
In article <503b3247$0$6877$e4fe514c@news2.news.xs4all.nl>,
 Hans Mulder <hansmu@xs4all.nl> wrote:
> On 26/08/12 20:47:34, Nicholas Cole wrote:
> It has been changed to
> 
> ~/Library/Python/$py_version_short/lib/python/site-packages
> 
> You can find the path it's looking for in site.USER_SITE

That is correct.

> It would be nice if there were some magic code you could use
> for "install_lib" in your .pydistutils.cfg file that worked
> in both 3.2 and 3.3.

As I explained in my reply that overlapped with yours, I believe you 
will find that 3.2 and 3.3 behave the same.   The difference is with 3.1 
(which is no longer supported); likewise, the same change occurred in 
2.7.  So all of the current actively supported released behave the same 
way.  That's not much help if you need to use 2.6 or 3.1.

-- 
 Ned Deily,
 nad@acm.org

[toc] | [prev] | [next] | [standalone]


#27968

FromNicholas Cole <nicholas.cole@gmail.com>
Date2012-08-27 10:29 +0100
Message-ID<mailman.3864.1346059753.4697.python-list@python.org>
In reply to#27965
On Mon, Aug 27, 2012 at 10:05 AM, Ned Deily <nad@acm.org> wrote:
> In article <503b3247$0$6877$e4fe514c@news2.news.xs4all.nl>,
>  Hans Mulder <hansmu@xs4all.nl> wrote:
>> On 26/08/12 20:47:34, Nicholas Cole wrote:
>> It has been changed to
>>
>> ~/Library/Python/$py_version_short/lib/python/site-packages
>>
>> You can find the path it's looking for in site.USER_SITE
>
> That is correct.
>
>> It would be nice if there were some magic code you could use
>> for "install_lib" in your .pydistutils.cfg file that worked
>> in both 3.2 and 3.3.
>
> As I explained in my reply that overlapped with yours, I believe you
> will find that 3.2 and 3.3 behave the same.   The difference is with 3.1
> (which is no longer supported); likewise, the same change occurred in
> 2.7.  So all of the current actively supported released behave the same
> way.  That's not much help if you need to use 2.6 or 3.1.

Dear Hans and Ned,

Thank you both for your answers, and Ned, thank you especially for
answering at such length.

I do love the things that are "documented if you know where to look."
I'm by no means a stranger to python's documentation, but I am sure
that I would never, ever have found it.  Now that I come to think of
it, I think I probably hit this when I first had a look at  2.7, put
in a sym-link and forgot all about it.  I suppose that now that 2.7 is
the default on OS X, I suppose it is time to move to the correct
directory properly.

Very best wishes,

Nicholas

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web